Browse Source

2008-04-20 Ivan N. Zlatev <[email protected]>

	* XplatUIX11.cs: Win32 doesn't send WM_(KILL|SET)FOCUS 
	if the handle is disabled.
	[Fixes bug #371751]


svn path=/trunk/mcs/; revision=101235
Ivan Zlatev 17 years ago
parent
commit
b714ade707

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

@@ -1,3 +1,9 @@
+2008-04-20  Ivan N. Zlatev  <[email protected]>
+
+	* XplatUIX11.cs: Win32 doesn't send WM_(KILL|SET)FOCUS 
+	if the handle is disabled.
+	[Fixes bug #371751]
+
 2008-04-20  Ivan N. Zlatev  <[email protected]>
 
 	* XplatUIX11.cs: Enable Maximize/Minimize/Close ability (not decorations) 

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

@@ -5183,6 +5183,10 @@ namespace System.Windows.Forms {
 				return;
 			}
 
+			// Win32 doesn't do anything if disabled
+			if (!hwnd.enabled)
+				return;
+
 			prev_focus_window = FocusWindow;
 			FocusWindow = hwnd.client_window;
 			Keyboard.FocusIn (FocusWindow);