Author: toshok
Date: 2006-10-18 17:52:10 -0400 (Wed, 18 Oct 2006)
New Revision: 66805

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
        * XplatUIX11.cs (SystrayAdd): a rather convoluted change, but the
        systray stuff is rather convoluted to begin with.

        systray icons are a single window for some reason (that I haven't
        figured out yet), and for them, client_window == whole_window.
        Given the way the tests are structured elsewhere to determine
        which paints are pending (client vs. nc), that situation will
        always yield PAINT, not NCPAINT.  So, if we have a pending
        nc_expose and no pending expose, remove the hwnd from the paint
        queue, and also set nc_expose_pending to false, to keep us from
        blocking further expose's adding the hwnd to the paint queue.

        phew.  like i said, a rather convoluted change.  Fixes the
        notifyicon repaint issues in bug #79645.

2006-10-18  Chris Toshok  <[EMAIL PROTECTED]>



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-10-18 21:46:11 UTC (rev 66804)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-10-18 21:52:10 UTC (rev 66805)
@@ -1,5 +1,22 @@
 2006-10-18  Chris Toshok  <[EMAIL PROTECTED]>
 
+       * XplatUIX11.cs (SystrayAdd): a rather convoluted change, but the
+       systray stuff is rather convoluted to begin with.
+
+       systray icons are a single window for some reason (that I haven't
+       figured out yet), and for them, client_window == whole_window.
+       Given the way the tests are structured elsewhere to determine
+       which paints are pending (client vs. nc), that situation will
+       always yield PAINT, not NCPAINT.  So, if we have a pending
+       nc_expose and no pending expose, remove the hwnd from the paint
+       queue, and also set nc_expose_pending to false, to keep us from
+       blocking further expose's adding the hwnd to the paint queue.
+
+       phew.  like i said, a rather convoluted change.  Fixes the
+       notifyicon repaint issues in bug #79645.
+
+2006-10-18  Chris Toshok  <[EMAIL PROTECTED]>
+
        * Form.cs: when getting the backcolor of the form, don't get
        base.BackColor, as this allows parents to influence the background
        color.  This breaks mdi forms.  Instead, if the background_color

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-10-18 21:46:11 UTC (rev 66804)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-10-18 21:52:10 UTC (rev 66805)
@@ -3137,7 +3137,7 @@
 
                        if (hwnd.client_window == xevent.AnyEvent.window) {
                                client = true;
-                               //Console.WriteLine("Client message, sending to 
window {0:X}", msg.hwnd.ToInt32());
+                               //Console.WriteLine("Client message {1}, 
sending to window {0:X}", msg.hwnd.ToInt32(), xevent.type);
                        } else {
                                client = false;
                                //Console.WriteLine("Non-Client message, 
sending to window {0:X}", msg.hwnd.ToInt32());
@@ -4822,6 +4822,16 @@
                                if (hwnd.client_window != hwnd.whole_window) {
                                        XDestroyWindow(DisplayHandle, 
hwnd.client_window);
                                        hwnd.client_window = hwnd.whole_window;
+
+                                       /* by virtue of the way the tests are 
ordered when determining if it's PAINT
+                                          or NCPAINT, client_window == 
whole_window will always be PAINT.  So, if we're
+                                          waiting on an nc_expose, drop it and 
remove the hwnd from the list (unless
+                                          there's a pending expose). */
+                                       if (hwnd.nc_expose_pending) {
+                                               hwnd.nc_expose_pending = false;
+                                               if (!hwnd.expose_pending)
+                                                       hwnd.Queue.Paint.Remove 
(hwnd);
+                                       }
                                }
 
                                size_hints = new XSizeHints();

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

Reply via email to