Author: everaldo
Date: 2007-04-27 09:16:11 -0400 (Fri, 27 Apr 2007)
New Revision: 76385

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2007-04-26  Everaldo Canuto  <[EMAIL PROTECTED]>

        * XplatUIX11.cs: Simplify SystrayRemove to be like other libraries,     
Gtk as 
        example just set visible to false and make this prevent from other 
problems.
        In SystrayAdd always remove pending expose. Fixes #81072.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-04-27 12:42:06 UTC (rev 76384)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-04-27 13:16:11 UTC (rev 76385)
@@ -1,3 +1,9 @@
+2007-04-26  Everaldo Canuto  <[EMAIL PROTECTED]>
+
+       * XplatUIX11.cs: Simplify SystrayRemove to be like other libraries,     
Gtk as 
+       example just set visible to false and make this prevent from other 
problems.
+       In SystrayAdd always remove pending expose. Fixes #81072.
+
 2007-04-26  Marek Safar  <[EMAIL PROTECTED]>
 
        * TextBoxBase.cs (CaretMoved): Consider scroll maximum when scroll

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2007-04-27 12:42:06 UTC (rev 76384)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2007-04-27 13:16:11 UTC (rev 76385)
@@ -5524,16 +5524,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);
-                                       }
+                               /* 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();
@@ -5593,30 +5593,8 @@
 
                internal override void SystrayRemove(IntPtr handle, ref ToolTip 
tt) {
 
-#if GTKSOCKET_SUPPORTS_REPARENTING
-                       Hwnd    hwnd;
+                       SetVisible (handle, false, false);
 
-                       hwnd = Hwnd.ObjectFromHandle(handle);
-
-                       /* in the XEMBED spec, it mentions 3 ways for a client 
window to break the protocol with the embedder.
-                        * 1. The embedder can unmap the window and reparent to 
the root window (we should probably handle this...)
-                        * 2. The client can reparent its window out of the 
embedder window.
-                        * 3. The client can destroy its window.
-                        *
-                        * this call to SetParent is case 2, but in
-                        * the spec it also mentions that gtk doesn't
-                        * support this at present.  Looking at HEAD
-                        * gtksocket-x11.c jives with this statement.
-                        *
-                        * so we can't reparent.  we have to destroy.
-                        */
-                       SetParent(hwnd.whole_window, FosterParent);
-#else
-                       Control control = Control.FromHandle(handle);
-                       if (control is NotifyIcon.NotifyIconWindow)
-                               
((NotifyIcon.NotifyIconWindow)control).InternalRecreateHandle ();
-#endif
-
                        // The caller can now re-dock it later...
                        if (tt != null) {
                                tt.Dispose();

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

Reply via email to