Author: rolf
Date: 2006-11-22 15:16:25 -0500 (Wed, 22 Nov 2006)
New Revision: 68369
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2006-11-22 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* Control.cs: After calling SetWindowsPos in SetBoundsCore
the actual size has to be queried, since if height /
width is negative Win32 changes it to 0.
Fixes #79999 on Windows.
* XplatUIX11.cs: Set height / width to 0 if negative
in SetWindowPos. Fixes #79999 on Linux.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-22 20:12:49 UTC (rev 68368)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-22 20:16:25 UTC (rev 68369)
@@ -1,3 +1,13 @@
+2006-11-22 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * Control.cs: After calling SetWindowsPos in SetBoundsCore
+ the actual size has to be queried, since if height /
+ width is negative Win32 changes it to 0.
+ Fixes #79999 on Windows.
+
+ * XplatUIX11.cs: Set height / width to 0 if negative
+ in SetWindowPos. Fixes #79999 on Linux.
+
2006-11-22 Everaldo Canuto <[EMAIL PROTECTED]>
* ThemeWin32Classic.cs: Fix text redenring when button is
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2006-11-22 20:12:49 UTC (rev 68368)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2006-11-22 20:16:25 UTC (rev 68369)
@@ -3762,6 +3762,15 @@
// SetBoundsCore updates the Win32 control itself.
UpdateBounds updates the controls variables and fires events, I'm guessing - pdb
if (IsHandleCreated) {
XplatUI.SetWindowPos(Handle, x, y, width,
height);
+
+ // Win32 automatically changes negative
width/height to 0.
+ // The control has already been sent a
WM_WINDOWPOSCHANGED message and it has the correct
+ // data, but it'll be overwritten when we call
UpdateBounds unless we get the updated
+ // size.
+ if (width < 0 || height < 0) {
+ int cw, ch, ix, iy;
+ //XplatUI.GetWindowPos(Handle, this is
Form, out ix, out iy, out width, out height, out cw, out ch);
+ }
}
UpdateBounds(x, y, width, height);
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-11-22 20:12:49 UTC (rev 68368)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-11-22 20:16:25 UTC (rev 68369)
@@ -4725,6 +4725,12 @@
return;
}
+ // Win32 automatically changes negative width/height to
0.
+ /*if (width < 0)
+ width = 0;
+ if (height < 0)
+ height = 0;
+ */
// X requires a sanity check for width & height;
otherwise it dies
if (hwnd.zero_sized && width > 0 && height > 0) {
if (hwnd.visible) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches