Author: everaldo
Date: 2007-01-06 02:07:47 -0500 (Sat, 06 Jan 2007)
New Revision: 70565
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/XplatUIWin32.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2007-01-05 Everaldo Canuto <[EMAIL PROTECTED]>
* Control.cs: Under InternalBorderStyle call RecreateHangle to
mimic same behavior than win32 that set border only in CreateParams,
it fix problems under CreateParams overrides. Fix #79442 and partial
fix #79537.
* XplatUIX11.cs: Dont set hwnd.border_style in SetBorderStyle instead
of thi control you must call recreate handle.
* XplatUIWin32.cs: Remove all SetBorderStyle code, for win32 we dont
need to do anything as RecreateHangle will take care about borders.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-05 22:42:56 UTC (rev 70564)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-06 07:07:47 UTC (rev 70565)
@@ -1,3 +1,16 @@
+2007-01-05 Everaldo Canuto <[EMAIL PROTECTED]>
+
+ * Control.cs: Under InternalBorderStyle call RecreateHangle to
+ mimic same behavior than win32 that set border only in CreateParams,
+ it fix problems under CreateParams overrides. Fix #79442 and partial
+ fix #79537.
+
+ * XplatUIX11.cs: Dont set hwnd.border_style in SetBorderStyle instead
+ of thi control you must call recreate handle.
+
+ * XplatUIWin32.cs: Remove all SetBorderStyle code, for win32 we dont
+ need to do anything as RecreateHangle will take care about borders.
+
2007-01-05 Mike Kestner <[EMAIL PROTECTED]>
* ListView.cs: hack to eliminate Lost/Got focus notifications on
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-01-05 22:42:56 UTC (rev 70564)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-01-06 07:07:47 UTC (rev 70565)
@@ -996,8 +996,9 @@
border_style = value;
if (IsHandleCreated) {
-
XplatUI.SetBorderStyle(window.Handle, (FormBorderStyle)border_style);
- Refresh();
+ XplatUI.SetBorderStyle
(window.Handle, (FormBorderStyle)border_style);
+ RecreateHandle ();
+ Refresh ();
}
}
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
2007-01-05 22:42:56 UTC (rev 70564)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
2007-01-06 07:07:47 UTC (rev 70565)
@@ -2165,38 +2165,7 @@
internal override void SetBorderStyle(IntPtr handle,
FormBorderStyle border_style) {
- uint style;
- uint exstyle;
-
- style = Win32GetWindowLong(handle,
WindowLong.GWL_STYLE);
- exstyle = Win32GetWindowLong(handle,
WindowLong.GWL_EXSTYLE);
-
-
- switch (border_style) {
- case FormBorderStyle.None: {
- style &= ~(uint)WindowStyles.WS_BORDER;
- exstyle &=
~(uint)WindowExStyles.WS_EX_CLIENTEDGE;
- break;
- }
-
- case FormBorderStyle.FixedSingle: {
- style |= (uint)WindowStyles.WS_BORDER;
- exstyle &=
~(uint)WindowExStyles.WS_EX_CLIENTEDGE;
- break;
- }
-
- case FormBorderStyle.Fixed3D: {
- style &= ~(uint)WindowStyles.WS_BORDER;
- exstyle |=
(uint)WindowExStyles.WS_EX_CLIENTEDGE;
- break;
- }
- }
-
- Win32SetWindowLong(handle, WindowLong.GWL_STYLE, style);
- Win32SetWindowLong(handle, WindowLong.GWL_EXSTYLE,
exstyle);
-
- Win32SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0,
- SetWindowPosFlags.SWP_FRAMECHANGED |
SetWindowPosFlags.SWP_NOMOVE | SetWindowPosFlags.SWP_NOSIZE |
SetWindowPosFlags.SWP_NOACTIVATE | SetWindowPosFlags.SWP_NOOWNERZORDER |
SetWindowPosFlags.SWP_NOZORDER);
+ // Nothing to do on Win32
}
internal override void SetMenu(IntPtr handle, Menu menu) {
@@ -2204,7 +2173,6 @@
Win32SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0,
SetWindowPosFlags.SWP_FRAMECHANGED | SetWindowPosFlags.SWP_NOMOVE |
SetWindowPosFlags.SWP_NOSIZE);
}
-
internal override Point GetMenuOrigin(IntPtr handle) {
return new
Point(SystemInformation.FrameBorderSize.Width,
SystemInformation.FrameBorderSize.Height + ThemeEngine.Current.CaptionHeight);
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2007-01-05 22:42:56 UTC (rev 70564)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2007-01-06 07:07:47 UTC (rev 70565)
@@ -4447,7 +4447,6 @@
form.window_manager = new InternalWindowManager
(form);
}
- hwnd.border_style = border_style;
RequestNCRecalc(handle);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches