Author: toshok
Date: 2007-02-20 20:04:54 -0500 (Tue, 20 Feb 2007)
New Revision: 73226

Modified:
   
branches/mwf-handle-branch/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   
branches/mwf-handle-branch/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2007-02-20  Chris Toshok  <[EMAIL PROTECTED]>

        * XplatUIX11.cs (WaitForHwndMessage): we need to loop until we get
        the message we need.  PeekMessage returning false should not be a
        condition under which we exit the loop.



Modified: 
branches/mwf-handle-branch/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- 
branches/mwf-handle-branch/Managed.Windows.Forms/System.Windows.Forms/ChangeLog 
    2007-02-21 00:48:55 UTC (rev 73225)
+++ 
branches/mwf-handle-branch/Managed.Windows.Forms/System.Windows.Forms/ChangeLog 
    2007-02-21 01:04:54 UTC (rev 73226)
@@ -1,3 +1,9 @@
+2007-02-20  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * XplatUIX11.cs (WaitForHwndMessage): we need to loop until we get
+       the message we need.  PeekMessage returning false should not be a
+       condition under which we exit the loop.
+
 2007-02-15  Chris Toshok  <[EMAIL PROTECTED]>
 
        * Control.cs (Refresh): only refresh if we've got a handle and are

Modified: 
branches/mwf-handle-branch/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- 
branches/mwf-handle-branch/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
 2007-02-21 00:48:55 UTC (rev 73225)
+++ 
branches/mwf-handle-branch/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
 2007-02-21 01:04:54 UTC (rev 73226)
@@ -1274,14 +1274,19 @@
 
                        queue.DispatchIdle = false;
 
-                       while (PeekMessage(queue, ref msg, IntPtr.Zero, 0, 0, 
(uint)PeekMessageFlags.PM_REMOVE)) {
-                               bool done = (msg.hwnd == hwnd.Handle) && 
(Msg)msg.message == message;
-                               TranslateMessage (ref msg);
-                               DispatchMessage (ref msg);
-                               if (done)
+                       bool done = false;
+                       do {
+                               if 
(ThreadQueue(Thread.CurrentThread).PostQuitState)
                                        break;
-                       }
 
+                               if (PeekMessage(queue, ref msg, IntPtr.Zero, 0, 
0, (uint)PeekMessageFlags.PM_REMOVE)) {
+                                       Console.WriteLine ("got message {0}", 
(Msg)msg.message);
+                                       done = (msg.hwnd == hwnd.Handle) && 
(Msg)msg.message == message;
+                                       TranslateMessage (ref msg);
+                                       DispatchMessage (ref msg);
+                               }
+                       } while (!done);
+
                        queue.DispatchIdle = true;
 
                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to