瀏覽代碼

2006-03-13 Peter Dennis Bartok <[email protected]>

	* XplatUIStructs.cs: Split WindowStyles into WindowStyles and 
	  WindowExStyles and marked both enums as Flags
	* Form.cs, ComboBox.cs, ToolTip.cs, Control.cs, PropertyGridView.cs,
	  NotifyIcon.cs, MenuAPI.cs, XplatUIOSX.cs, MonthCalendar.cs: Updated
	  to match WindowStyles split
	* XplatUIX11.cs:
	  - SetWMStyles: Added cehck to not apply WM attributes to Child windows
	  - Updated to match WindowStyles split
	* XplatUIWin32.cs:
	  - Fixed FosterParent creation, was using ExStyle on the Style field
	    (This should help with Popup focus issues)
	  - Updated to match WindowStyles split


svn path=/trunk/mcs/; revision=57903
Peter Dennis Bartok 20 年之前
父節點
當前提交
629fa88117

+ 15 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,18 @@
+2006-03-13  Peter Dennis Bartok  <[email protected]>
+
+	* XplatUIStructs.cs: Split WindowStyles into WindowStyles and 
+	  WindowExStyles and marked both enums as Flags
+	* Form.cs, ComboBox.cs, ToolTip.cs, Control.cs, PropertyGridView.cs,
+	  NotifyIcon.cs, MenuAPI.cs, XplatUIOSX.cs, MonthCalendar.cs: Updated
+	  to match WindowStyles split
+	* XplatUIX11.cs:
+	  - SetWMStyles: Added cehck to not apply WM attributes to Child windows
+	  - Updated to match WindowStyles split
+	* XplatUIWin32.cs:
+	  - Fixed FosterParent creation, was using ExStyle on the Style field
+	    (This should help with Popup focus issues)
+	  - Updated to match WindowStyles split
+
 2006-03-13  Jackson Harper  <[email protected]>
 
 	* MdiWindowManager.cs: Use the system menu height. Fixes some

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs

@@ -1518,7 +1518,7 @@ namespace System.Windows.Forms
 					if (owner != null && owner.DropDownStyle != ComboBoxStyle.Simple) {
 						cp.Style ^= (int) WindowStyles.WS_CHILD;
 						cp.Style |= (int) WindowStyles.WS_POPUP;
-						cp.ExStyle |= (int)(WindowStyles.WS_EX_TOOLWINDOW | WindowStyles.WS_EX_TOPMOST);
+						cp.ExStyle |= (int)(WindowExStyles.WS_EX_TOOLWINDOW | WindowExStyles.WS_EX_TOPMOST);
 					}					
 					return cp;
 				}

+ 2 - 2
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs

@@ -2342,7 +2342,7 @@ namespace System.Windows.Forms
 				create_params.Param = 0;
 
 				if (allow_drop) {
-					create_params.ExStyle |= (int)WindowStyles.WS_EX_ACCEPTFILES;
+					create_params.ExStyle |= (int)WindowExStyles.WS_EX_ACCEPTFILES;
 				}
 
 				if (parent!=null) {
@@ -2364,7 +2364,7 @@ namespace System.Windows.Forms
 					create_params.Style |= (int) WindowStyles.WS_BORDER;
 					break;
 				case BorderStyle.Fixed3D:
-					create_params.ExStyle |= (int) WindowStyles.WS_EX_CLIENTEDGE;
+					create_params.ExStyle |= (int) WindowExStyles.WS_EX_CLIENTEDGE;
 					break;
 				}
 

+ 10 - 10
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs

@@ -907,13 +907,13 @@ namespace System.Windows.Forms {
 					cp.Style |= (int)(WindowStyles.WS_CHILD | WindowStyles.WS_CAPTION);
 					cp.Parent = Parent.Handle;
 
-					cp.ExStyle |= (int) (WindowStyles.WS_EX_WINDOWEDGE | WindowStyles.WS_EX_MDICHILD);
+					cp.ExStyle |= (int) (WindowExStyles.WS_EX_WINDOWEDGE | WindowExStyles.WS_EX_MDICHILD);
 					switch (FormBorderStyle) {
 					case FormBorderStyle.None:
 						break;
 					case FormBorderStyle.FixedToolWindow:
 					case FormBorderStyle.SizableToolWindow:
-						cp.ExStyle |= (int) WindowStyles.WS_EX_TOOLWINDOW;
+						cp.ExStyle |= (int) WindowExStyles.WS_EX_TOOLWINDOW;
 						goto default;
 					default:
 						cp.Style |= (int) WindowStyles.WS_OVERLAPPEDWINDOW;
@@ -924,13 +924,13 @@ namespace System.Windows.Forms {
 					switch (FormBorderStyle) {
 						case FormBorderStyle.Fixed3D: {
 							cp.Style |= (int)(WindowStyles.WS_CAPTION | WindowStyles.WS_BORDER);
-							cp.ExStyle |= (int)WindowStyles.WS_EX_CLIENTEDGE; 
+							cp.ExStyle |= (int)WindowExStyles.WS_EX_CLIENTEDGE; 
 							break;
 						}
 
 						case FormBorderStyle.FixedDialog: {
 							cp.Style |= (int)(WindowStyles.WS_CAPTION | WindowStyles.WS_BORDER);
-							cp.ExStyle |= (int)(WindowStyles.WS_EX_DLGMODALFRAME);
+							cp.ExStyle |= (int)(WindowExStyles.WS_EX_DLGMODALFRAME);
 							break;
 						}
 
@@ -941,7 +941,7 @@ namespace System.Windows.Forms {
 
 						case FormBorderStyle.FixedToolWindow: { 
 							cp.Style |= (int)(WindowStyles.WS_CAPTION | WindowStyles.WS_BORDER);
-							cp.ExStyle |= (int)(WindowStyles.WS_EX_TOOLWINDOW);
+							cp.ExStyle |= (int)(WindowExStyles.WS_EX_TOOLWINDOW);
 							break;
 						}
 
@@ -952,7 +952,7 @@ namespace System.Windows.Forms {
 
 						case FormBorderStyle.SizableToolWindow: {
 							cp.Style |= (int)(WindowStyles.WS_BORDER | WindowStyles.WS_THICKFRAME | WindowStyles.WS_CAPTION);
-							cp.ExStyle |= (int)(WindowStyles.WS_EX_TOOLWINDOW);
+							cp.ExStyle |= (int)(WindowExStyles.WS_EX_TOOLWINDOW);
 							break;
 						}
 
@@ -975,11 +975,11 @@ namespace System.Windows.Forms {
 				}
 
 				if (TopMost) {
-					cp.ExStyle |= (int) WindowStyles.WS_EX_TOPMOST;
+					cp.ExStyle |= (int) WindowExStyles.WS_EX_TOPMOST;
 				}
 
 				if (ShowInTaskbar) {
-					cp.ExStyle |= (int)WindowStyles.WS_EX_APPWINDOW;
+					cp.ExStyle |= (int)WindowExStyles.WS_EX_APPWINDOW;
 				}
 
 				if (MaximizeBox) {
@@ -995,14 +995,14 @@ namespace System.Windows.Forms {
 				}
 
 				if (HelpButton && !MaximizeBox && !MinimizeBox) {
-					cp.ExStyle |= (int)WindowStyles.WS_EX_CONTEXTHELP;
+					cp.ExStyle |= (int)WindowExStyles.WS_EX_CONTEXTHELP;
 				}
 				
 				if (Visible)
 					cp.Style |= (int)WindowStyles.WS_VISIBLE;
 
 				if (Opacity < 1.0 || TransparencyKey != Color.Empty) {
-					cp.ExStyle |= (int)WindowStyles.WS_EX_LAYERED;
+					cp.ExStyle |= (int)WindowExStyles.WS_EX_LAYERED;
 				}
 
 				if (!is_enabled && context == null) {

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs

@@ -665,7 +665,7 @@ namespace System.Windows.Forms {
 				CreateParams cp = base.CreateParams;
 				cp.Caption = "Menu PopUp";
 				cp.Style = unchecked ((int)(WindowStyles.WS_POPUP));
-				cp.ExStyle |= (int)(WindowStyles.WS_EX_TOOLWINDOW | WindowStyles.WS_EX_TOPMOST);
+				cp.ExStyle |= (int)(WindowExStyles.WS_EX_TOOLWINDOW | WindowExStyles.WS_EX_TOPMOST);
 				return cp;
 			}
 		}

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/MonthCalendar.cs

@@ -705,7 +705,7 @@ namespace System.Windows.Forms {
 					CreateParams cp = base.CreateParams;					
 					cp.Style ^= (int) WindowStyles.WS_CHILD;
 					cp.Style |= (int) WindowStyles.WS_POPUP;
-					cp.ExStyle |= (int)(WindowStyles.WS_EX_TOOLWINDOW | WindowStyles.WS_EX_TOPMOST);
+					cp.ExStyle |= (int)(WindowExStyles.WS_EX_TOOLWINDOW | WindowExStyles.WS_EX_TOPMOST);
 
 					return cp;
 				}

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/NotifyIcon.cs

@@ -82,7 +82,7 @@ namespace System.Windows.Forms {
 					cp.Style = (int)WindowStyles.WS_POPUP;
 					cp.Style |= (int)WindowStyles.WS_CLIPSIBLINGS;
 
-					cp.ExStyle = (int)(WindowStyles.WS_EX_TOOLWINDOW);
+					cp.ExStyle = (int)(WindowExStyles.WS_EX_TOOLWINDOW);
 
 					return cp;
 				}

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs

@@ -746,7 +746,7 @@ namespace System.Windows.Forms.PropertyGridInternal
 				{
 					CreateParams cp = base.CreateParams;				
 					cp.Style = unchecked ((int)(WindowStyles.WS_POPUP | WindowStyles.WS_VISIBLE | WindowStyles.WS_CLIPSIBLINGS | WindowStyles.WS_CLIPCHILDREN));
-					cp.ExStyle |= (int)(WindowStyles.WS_EX_TOOLWINDOW | WindowStyles.WS_EX_TOPMOST);				
+					cp.ExStyle |= (int)(WindowExStyles.WS_EX_TOOLWINDOW | WindowExStyles.WS_EX_TOPMOST);				
 					return cp;
 				}
 			}

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs

@@ -96,7 +96,7 @@ namespace System.Windows.Forms {
 					cp.Style = (int)WindowStyles.WS_POPUP;
 					cp.Style |= (int)WindowStyles.WS_CLIPSIBLINGS;
 
-					cp.ExStyle = (int)(WindowStyles.WS_EX_TOOLWINDOW | WindowStyles.WS_EX_TOPMOST);
+					cp.ExStyle = (int)(WindowExStyles.WS_EX_TOOLWINDOW | WindowExStyles.WS_EX_TOPMOST);
 
 					return cp;
 				}

+ 6 - 6
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIOSX.cs

@@ -797,7 +797,7 @@ namespace System.Windows.Forms {
 
 			title_style = TitleStyle.None;
 			if ((Style & (int)WindowStyles.WS_CAPTION) != 0) {
-				if ((ExStyle & (int)WindowStyles.WS_EX_TOOLWINDOW) != 0) {
+				if ((ExStyle & (int)WindowExStyles.WS_EX_TOOLWINDOW) != 0) {
 					title_style = TitleStyle.Tool;
 				} else {
 					title_style = TitleStyle.Normal;
@@ -805,14 +805,14 @@ namespace System.Windows.Forms {
 			}
 
 			border_style = FormBorderStyle.None;
-			if ((ExStyle & (int)WindowStyles.WS_EX_WINDOWEDGE) != 0) {
-				if ((ExStyle & (int)WindowStyles.WS_EX_TOOLWINDOW) != 0) {
+			if ((ExStyle & (int)WindowExStyles.WS_EX_WINDOWEDGE) != 0) {
+				if ((ExStyle & (int)WindowExStyles.WS_EX_TOOLWINDOW) != 0) {
 					if ((Style & (int)WindowStyles.WS_THICKFRAME) != 0) {
 						border_style = FormBorderStyle.SizableToolWindow;
 					} else {
 						border_style = FormBorderStyle.FixedToolWindow;
 					}
-				} else if ((ExStyle & (int)WindowStyles.WS_EX_DLGMODALFRAME) != 0) {
+				} else if ((ExStyle & (int)WindowExStyles.WS_EX_DLGMODALFRAME) != 0) {
 					border_style = FormBorderStyle.FixedDialog;
 				} else if ((ExStyle & (int)WindowStyles.WS_THICKFRAME) != 0) {
 					border_style = FormBorderStyle.Sizable;
@@ -923,7 +923,7 @@ namespace System.Windows.Forms {
 				if ((cp.Style & ((int)WindowStyles.WS_SYSMENU)) != 0) {
 					attributes |= WindowAttributes.kWindowCloseBoxAttribute;
 				}
-				if ((cp.ExStyle & ((int)WindowStyles.WS_EX_TOOLWINDOW)) != 0) {
+				if ((cp.ExStyle & ((int)WindowExStyles.WS_EX_TOOLWINDOW)) != 0) {
 					attributes = WindowAttributes.kWindowStandardHandlerAttribute | WindowAttributes.kWindowCompositingAttribute;
 				}
 				if ((cp.Style & ((int)WindowStyles.WS_CAPTION)) != 0) {
@@ -1666,7 +1666,7 @@ namespace System.Windows.Forms {
 				if ((cp.Style & ((int)WindowStyles.WS_SYSMENU)) != 0) {
 					attributes |= WindowAttributes.kWindowCloseBoxAttribute;
 				}
-				if ((cp.ExStyle & ((int)WindowStyles.WS_EX_TOOLWINDOW)) != 0) {
+				if ((cp.ExStyle & ((int)WindowExStyles.WS_EX_TOOLWINDOW)) != 0) {
 					attributes = WindowAttributes.kWindowStandardHandlerAttribute | WindowAttributes.kWindowCompositingAttribute;
 				}
 

+ 4 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs

@@ -31,6 +31,7 @@ using System.Drawing;
 using System.Runtime.InteropServices;
 
 namespace System.Windows.Forms {
+	[Flags]
 	internal enum WindowStyles : int {
 		WS_OVERLAPPED		= 0x00000000,
 		WS_POPUP		= unchecked((int)0x80000000),
@@ -59,7 +60,10 @@ namespace System.Windows.Forms {
 		WS_OVERLAPPEDWINDOW	= WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
 		WS_TILEDWINDOW		= WS_OVERLAPPEDWINDOW,
 		WS_CHILDWINDOW		= WS_CHILD,
+	}
 
+	[Flags]
+	internal enum WindowExStyles : int {
 		// Extended Styles
 		WS_EX_DLGMODALFRAME	= 0x00000001,
 		WS_EX_DRAGDETECT	= 0x00000002,

+ 7 - 7
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs

@@ -652,7 +652,7 @@ namespace System.Windows.Forms {
 				Win32MessageBox(IntPtr.Zero, "Could not register the "+XplatUI.DefaultClassName+" window class, win32 error " + Win32GetLastError().ToString(), "Oops", 0);
 			}
 
-			FosterParent=Win32CreateWindow(0, "static", "Foster Parent Window", (int)(WindowStyles.WS_OVERLAPPEDWINDOW | WindowStyles.WS_EX_TOOLWINDOW), 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
+			FosterParent=Win32CreateWindow((int)WindowExStyles.WS_EX_TOOLWINDOW, "static", "Foster Parent Window", (int)WindowStyles.WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
 
 			if (FosterParent==IntPtr.Zero) {
 				Win32MessageBox(IntPtr.Zero, "Could not create foster window, win32 error " + Win32GetLastError().ToString(), "Oops", 0);
@@ -1046,14 +1046,14 @@ namespace System.Windows.Forms {
 				ParentHandle = FosterParent;
 			}
 
-			if ( ((cp.Style & (int)(WindowStyles.WS_CHILD | WindowStyles.WS_POPUP))==0) && ((cp.ExStyle & (int)WindowStyles.WS_EX_APPWINDOW) == 0)) {
+			if ( ((cp.Style & (int)(WindowStyles.WS_CHILD | WindowStyles.WS_POPUP))==0) && ((cp.ExStyle & (int)WindowExStyles.WS_EX_APPWINDOW) == 0)) {
 				// If we want to be hidden from the taskbar we need to be 'owned' by 
 				// something not on the taskbar. FosterParent is just that
 				ParentHandle = FosterParent;
 			}
 
 			// Since we fake MDI dont tell Windows that this is a real MDI window
-			if ((cp.ExStyle & (int) WindowStyles.WS_EX_MDICHILD) != 0) {
+			if ((cp.ExStyle & (int) WindowExStyles.WS_EX_MDICHILD) != 0) {
 				SetMdiStyles (cp);
 			}
 
@@ -1137,7 +1137,7 @@ namespace System.Windows.Forms {
 
 		internal override void SetWindowStyle(IntPtr handle, CreateParams cp) {
 
-			if ((cp.ExStyle & (int) WindowStyles.WS_EX_MDICHILD) != 0) {
+			if ((cp.ExStyle & (int) WindowExStyles.WS_EX_MDICHILD) != 0) {
 				SetMdiStyles (cp);
 			}
 
@@ -1905,19 +1905,19 @@ namespace System.Windows.Forms {
 			switch (border_style) {
 				case FormBorderStyle.None: {
 					style &= ~(uint)WindowStyles.WS_BORDER;
-					exstyle &= ~(uint)WindowStyles.WS_EX_CLIENTEDGE;
+					exstyle &= ~(uint)WindowExStyles.WS_EX_CLIENTEDGE;
 					break;
 				}
 
 				case FormBorderStyle.FixedSingle: {
 					style |= (uint)WindowStyles.WS_BORDER;
-					exstyle &= ~(uint)WindowStyles.WS_EX_CLIENTEDGE;
+					exstyle &= ~(uint)WindowExStyles.WS_EX_CLIENTEDGE;
 					break;
 				}
 
 				case FormBorderStyle.Fixed3D: {
 					style |= (uint)WindowStyles.WS_BORDER;
-					exstyle |= (uint)WindowStyles.WS_EX_CLIENTEDGE;
+					exstyle |= (uint)WindowExStyles.WS_EX_CLIENTEDGE;
 					break;
 				}
 			}

+ 20 - 15
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs

@@ -569,18 +569,18 @@ namespace System.Windows.Forms {
 			if ((Style & (int) WindowStyles.WS_CHILD) != 0) {
 				if ((Style & (int) WindowStyles.WS_BORDER) == 0) {
 					border_style = FormBorderStyle.None;
-				} else if ((ExStyle & (int) WindowStyles.WS_EX_CLIENTEDGE) != 0) {
+				} else if ((ExStyle & (int) WindowExStyles.WS_EX_CLIENTEDGE) != 0) {
 					border_style = FormBorderStyle.Fixed3D;
 				} else {
 					border_style = FormBorderStyle.FixedSingle;
 				}
 				title_style = TitleStyle.None;
 
-				if ((ExStyle & (int) WindowStyles.WS_EX_MDICHILD) != 0) {
+				if ((ExStyle & (int) WindowExStyles.WS_EX_MDICHILD) != 0) {
 					caption_height = 26;
 
 					if ((Style & (int)WindowStyles.WS_CAPTION) != 0) {
-						if ((ExStyle & (int)WindowStyles.WS_EX_TOOLWINDOW) != 0) {
+						if ((ExStyle & (int)WindowExStyles.WS_EX_TOOLWINDOW) != 0) {
 							title_style = TitleStyle.Tool;
 						} else {
 							title_style = TitleStyle.Normal;
@@ -588,7 +588,7 @@ namespace System.Windows.Forms {
 					}
 
 					if ((Style & (int) WindowStyles.WS_OVERLAPPEDWINDOW) != 0 ||
-							(ExStyle & (int) WindowStyles.WS_EX_TOOLWINDOW) != 0) {
+							(ExStyle & (int) WindowExStyles.WS_EX_TOOLWINDOW) != 0) {
 						border_style = (FormBorderStyle) 0xFFFF;
 					} else {
 						border_style = FormBorderStyle.None;
@@ -598,7 +598,7 @@ namespace System.Windows.Forms {
 			} else {
 				title_style = TitleStyle.None;
 				if ((Style & (int)WindowStyles.WS_CAPTION) != 0) {
-					if ((ExStyle & (int)WindowStyles.WS_EX_TOOLWINDOW) != 0) {
+					if ((ExStyle & (int)WindowExStyles.WS_EX_TOOLWINDOW) != 0) {
 						title_style = TitleStyle.Tool;
 					} else {
 						title_style = TitleStyle.Normal;
@@ -608,17 +608,17 @@ namespace System.Windows.Forms {
 				border_style = FormBorderStyle.None;
 
 				if ((Style & (int)WindowStyles.WS_THICKFRAME) != 0) {
-					if ((ExStyle & (int)WindowStyles.WS_EX_TOOLWINDOW) != 0) {
+					if ((ExStyle & (int)WindowExStyles.WS_EX_TOOLWINDOW) != 0) {
 						border_style = FormBorderStyle.SizableToolWindow;
 					} else {
 						border_style = FormBorderStyle.Sizable;
 					}
 				} else {
-					if ((ExStyle & (int)WindowStyles.WS_EX_CLIENTEDGE) != 0) {
+					if ((ExStyle & (int)WindowExStyles.WS_EX_CLIENTEDGE) != 0) {
 						border_style = FormBorderStyle.Fixed3D;
-					} else if ((ExStyle & (int)WindowStyles.WS_EX_DLGMODALFRAME) != 0) {
+					} else if ((ExStyle & (int)WindowExStyles.WS_EX_DLGMODALFRAME) != 0) {
 						border_style = FormBorderStyle.FixedDialog;
-					} else if ((ExStyle & (int)WindowStyles.WS_EX_TOOLWINDOW) != 0) {
+					} else if ((ExStyle & (int)WindowExStyles.WS_EX_TOOLWINDOW) != 0) {
 						border_style = FormBorderStyle.FixedToolWindow;
 					} else if ((Style & (int)WindowStyles.WS_BORDER) != 0) {
 						border_style = FormBorderStyle.Sizable;
@@ -640,6 +640,11 @@ namespace System.Windows.Forms {
 			int			atom_count;
 			Rectangle		client_rect;
 
+			// Child windows don't need WM window styles
+			if ((cp.Style & (int)WindowStyles.WS_CHILDWINDOW) != 0) {
+				return;
+			}
+
 			mwmHints = new MotifWmHints();
 			functions = 0;
 			decorations = 0;
@@ -671,7 +676,7 @@ namespace System.Windows.Forms {
 				functions |= MotifFunctions.Close;
 			}
 
-			if ((cp.ExStyle & ((int)WindowStyles.WS_EX_DLGMODALFRAME)) != 0) {
+			if ((cp.ExStyle & ((int)WindowExStyles.WS_EX_DLGMODALFRAME)) != 0) {
 				decorations |= MotifDecorations.Border;
 			}
 
@@ -683,7 +688,7 @@ namespace System.Windows.Forms {
 				decorations |= MotifDecorations.Border;
 			}
 
-			if ((cp.ExStyle & ((int)WindowStyles.WS_EX_TOOLWINDOW)) != 0) {
+			if ((cp.ExStyle & ((int)WindowExStyles.WS_EX_TOOLWINDOW)) != 0) {
 				functions = 0;
 				decorations = 0;
 			}
@@ -707,7 +712,7 @@ namespace System.Windows.Forms {
 				int[] atoms = new int[8];
 				atom_count = 0;
 
-				if ((cp.ExStyle & ((int)WindowStyles.WS_EX_TOOLWINDOW)) != 0) {
+				if ((cp.ExStyle & ((int)WindowExStyles.WS_EX_TOOLWINDOW)) != 0) {
 					atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_STATE_NO_TASKBAR].ToInt32();
 				}
 				XChangeProperty(DisplayHandle, hwnd.whole_window, NetAtoms[(int)NA._NET_WM_STATE], (IntPtr)Atom.XA_ATOM, 32, PropertyMode.Replace, atoms, atom_count);
@@ -716,7 +721,7 @@ namespace System.Windows.Forms {
 				IntPtr[] atom_ptrs = new IntPtr[2];
 
 				atom_ptrs[atom_count++] = NetAtoms[(int)NA.WM_DELETE_WINDOW];
-				if ((cp.ExStyle & (int)WindowStyles.WS_EX_CONTEXTHELP) != 0) {
+				if ((cp.ExStyle & (int)WindowExStyles.WS_EX_CONTEXTHELP) != 0) {
 					atom_ptrs[atom_count++] = NetAtoms[(int)NA._NET_WM_CONTEXT_HELP];
 				}
 
@@ -1921,7 +1926,7 @@ namespace System.Windows.Forms {
 			Attributes.win_gravity = Gravity.NorthWestGravity;
 
 			// Save what's under the toolwindow
-			if ((cp.ExStyle & (int)WindowStyles.WS_EX_TOOLWINDOW) != 0) {
+			if ((cp.ExStyle & (int)WindowExStyles.WS_EX_TOOLWINDOW) != 0) {
 				Attributes.save_under = true;
 				ValueMask |= SetWindowValuemask.SaveUnder;
 			}
@@ -1983,7 +1988,7 @@ namespace System.Windows.Forms {
 				}
 			}
 
-			if ((cp.ExStyle & (int) WindowStyles.WS_EX_TOPMOST) != 0) {
+			if ((cp.ExStyle & (int) WindowExStyles.WS_EX_TOPMOST) != 0) {
 				Console.WriteLine ("Setting transient:  " + XSetTransientForHint (DisplayHandle, hwnd.whole_window, RootWindow));
 			}