Author: pbartok
Date: 2006-06-01 11:55:36 -0400 (Thu, 01 Jun 2006)
New Revision: 61378
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-06-01 Peter Dennis Bartok <[EMAIL PROTECTED]>
* Control.cs: Don't handle WM_SETFOCUS if the same window already
has focus (works around X11 sending a FocusIn after our SetFocus)
* XplatUIX11.cs: Send KILLFOCUS before setting SETFOCUS on new window
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-01 15:20:24 UTC (rev 61377)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-01 15:55:36 UTC (rev 61378)
@@ -1,3 +1,9 @@
+2006-06-01 Peter Dennis Bartok <[EMAIL PROTECTED]>
+
+ * Control.cs: Don't handle WM_SETFOCUS if the same window already
+ has focus (works around X11 sending a FocusIn after our SetFocus)
+ * XplatUIX11.cs: Send KILLFOCUS before setting SETFOCUS on new window
+
2006-06-01 Alexander Olk <[EMAIL PROTECTED]>
* Mime.cs: Fix for the NET_2_0 build.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2006-06-01 15:20:24 UTC (rev 61377)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2006-06-01 15:55:36 UTC (rev 61378)
@@ -4140,9 +4140,11 @@
}
case Msg.WM_SETFOCUS: {
- OnEnter(EventArgs.Empty);
- this.has_focus = true;
- OnGotFocus(EventArgs.Empty);
+ if (!has_focus) {
+ OnEnter(EventArgs.Empty);
+ this.has_focus = true;
+ OnGotFocus(EventArgs.Empty);
+ }
return;
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-06-01 15:20:24 UTC (rev 61377)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-06-01 15:55:36 UTC (rev 61378)
@@ -4090,10 +4090,10 @@
return;
}
- SendMessage(hwnd.client_window, Msg.WM_SETFOCUS,
FocusWindow, IntPtr.Zero);
if (FocusWindow != IntPtr.Zero) {
SendMessage(FocusWindow, Msg.WM_KILLFOCUS,
hwnd.client_window, IntPtr.Zero);
}
+ SendMessage(hwnd.client_window, Msg.WM_SETFOCUS,
FocusWindow, IntPtr.Zero);
FocusWindow = hwnd.client_window;
//XSetInputFocus(DisplayHandle,
Hwnd.ObjectFromHandle(handle).client_window, RevertTo.None, IntPtr.Zero);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches