Author: andreia
Date: 2008-02-15 08:17:06 -0500 (Fri, 15 Feb 2008)
New Revision: 95747
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SendKeys.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
* XplatUIX11.cs: If the handle is null when posting a message, use the
current thread queue to post instead. Fixes #332409
* SendKeys.cs: Slight optimization
2008-02-15 Andreia Gaita <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-15 12:47:33 UTC (rev 95746)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-15 13:17:06 UTC (rev 95747)
@@ -1,3 +1,10 @@
+2008-02-15 Andreia Gaita <[EMAIL PROTECTED]>
+
+ * XplatUIX11.cs: If the handle is null when posting a message, use the
+ current thread queue to post instead. Fixes #332409
+
+ * SendKeys.cs: Slight optimization
+
2008-02-14 Ivan N. Zlatev <[EMAIL PROTECTED]>
* PropertyGrid.cs, PropertyGridView.cs:
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SendKeys.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SendKeys.cs
2008-02-15 12:47:33 UTC (rev 95746)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SendKeys.cs
2008-02-15 13:17:06 UTC (rev 95747)
@@ -305,9 +305,10 @@
}
private static void SendInput() {
- IntPtr hwnd = IntPtr.Zero;
- if (XplatUI.GetActive () != IntPtr.Zero) {
- Form active = ((Form) Control.FromHandle
(XplatUI.GetActive ()));
+ IntPtr hwnd = XplatUI.GetActive ();
+
+ if (hwnd != IntPtr.Zero) {
+ Form active = ((Form) Control.FromHandle
(hwnd));
if (active != null && active.ActiveControl !=
null)
hwnd = active.ActiveControl.Handle;
else if (active != null)
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2008-02-15 12:47:33 UTC (rev 95746)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2008-02-15 13:17:06 UTC (rev 95747)
@@ -4672,7 +4672,10 @@
xevent.ClientMessageEvent.ptr3 = wparam;
xevent.ClientMessageEvent.ptr4 = lparam;
- hwnd.Queue.EnqueueLocked (xevent);
+ if (hwnd != null)
+ hwnd.Queue.EnqueueLocked (xevent);
+ else
+ ThreadQueue(Thread.CurrentThread).EnqueueLocked
(xevent);
return true;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches