Author: pbartok
Date: 2006-05-17 17:23:16 -0400 (Wed, 17 May 2006)
New Revision: 60808

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2006-05-17  Peter Dennis Bartok  <[EMAIL PROTECTED]>

        * XplatUIX11.cs: If client_window ends up being width or height zero
          due to border settings, move it off window inside whole_window 
(#78433)



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-05-17 21:10:16 UTC (rev 60807)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-05-17 21:23:16 UTC (rev 60808)
@@ -1,3 +1,8 @@
+2006-05-17  Peter Dennis Bartok  <[EMAIL PROTECTED]>
+
+       * XplatUIX11.cs: If client_window ends up being width or height zero
+         due to border settings, move it off window inside whole_window 
(#78433)
+
 2006-05-17  Alexander Olk  <[EMAIL PROTECTED]>
 
        * Mime.cs: Shrink the mime file cache correctly.

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-05-17 21:10:16 UTC (rev 60807)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-05-17 21:23:16 UTC (rev 60808)
@@ -756,7 +756,11 @@
                                        transient = true;
                                        XSetTransientForHint(DisplayHandle, 
hwnd.whole_window, FosterParent);
                                }
-                               XMoveResizeWindow(DisplayHandle, 
hwnd.client_window, client_rect.X, client_rect.Y, client_rect.Width, 
client_rect.Height);
+                               if ((client_rect.Width < 1) || 
(client_rect.Height < 1)) {
+                                       XMoveResizeWindow(DisplayHandle, 
hwnd.client_window, -5, -5, 1, 1);
+                               } else {
+                                       XMoveResizeWindow(DisplayHandle, 
hwnd.client_window, client_rect.X, client_rect.Y, client_rect.Width, 
client_rect.Height);
+                               }
 
                                int[] atoms = new int[8];
                                atom_count = 0;
@@ -1522,7 +1526,11 @@
                        rect = new Rectangle(ncp.rgrc1.left, ncp.rgrc1.top, 
ncp.rgrc1.right - ncp.rgrc1.left, ncp.rgrc1.bottom - ncp.rgrc1.top);
 
                        if (hwnd.visible) {
-                               XMoveResizeWindow(DisplayHandle, 
hwnd.client_window, rect.X, rect.Y, rect.Width, rect.Height);
+                               if ((rect.Width < 1) || (rect.Height < 1)) {
+                                       XMoveResizeWindow(DisplayHandle, 
hwnd.client_window, -5, -5, 1, 1);
+                               } else {
+                                       XMoveResizeWindow(DisplayHandle, 
hwnd.client_window, rect.X, rect.Y, rect.Width, rect.Height);
+                               }
                        }
                }
                #endregion      // Private Methods
@@ -4278,8 +4286,12 @@
                                }
 
                                lock (XlibLock) {
+                                       if ((client_rect.Width < 1) || 
(client_rect.Height < 1)) {
+                                               
XMoveResizeWindow(DisplayHandle, hwnd.client_window, -5, -5, 1, 1);     // Hide 
the window
+                                       } else {
+                                               
XMoveResizeWindow(DisplayHandle, hwnd.client_window, client_rect.X, 
client_rect.Y, client_rect.Width, client_rect.Height);
+                                       }
                                        XMoveResizeWindow(DisplayHandle, 
hwnd.whole_window, x, y, width, height);
-                                       XMoveResizeWindow(DisplayHandle, 
hwnd.client_window, client_rect.X, client_rect.Y, client_rect.Width, 
client_rect.Height);
                                }
                        }
 

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

Reply via email to