Author: pbartok
Date: 2006-05-18 17:51:16 -0400 (Thu, 18 May 2006)
New Revision: 60843

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-18  Peter Dennis Bartok  <[EMAIL PROTECTED]> 

        * XplatUIX11.cs: 
          - Store the calculated rectangle in Hwnd object and use it when 
            setting the client size
          - Force Toolwindows to always be type Dock, to ensure they're on top



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-05-18 21:32:42 UTC (rev 60842)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-05-18 21:51:16 UTC (rev 60843)
@@ -1,3 +1,10 @@
+2006-05-18  Peter Dennis Bartok  <[EMAIL PROTECTED]> 
+
+       * XplatUIX11.cs: 
+         - Store the calculated rectangle in Hwnd object and use it when 
+           setting the client size
+         - Force Toolwindows to always be type Dock, to ensure they're on top
+
 2006-05-18  Mike Kestner  <[EMAIL PROTECTED]>
 
        * ComboBox.cs: first pass at ComboBox rework.  Layout is more

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-18 21:32:42 UTC (rev 60842)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-05-18 21:51:16 UTC (rev 60843)
@@ -778,8 +778,6 @@
                                        atom_count = 0;
 
                                        if ((cp.ExStyle & 
((int)WindowExStyles.WS_EX_TOOLWINDOW)) != 0) {
-                                               atoms[atom_count++] = 
atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_TOOLBAR].ToInt32();
-                                       } else if (decorations == 0) {
                                                atoms[atom_count++] = 
atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_DOCK].ToInt32();
                                        } else {
                                                atoms[atom_count++] = 
atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_DIALOG].ToInt32();
@@ -1521,9 +1519,10 @@
                        ncp = 
(XplatUIWin32.NCCALCSIZE_PARAMS)Marshal.PtrToStructure(ptr, 
typeof(XplatUIWin32.NCCALCSIZE_PARAMS));
                        Marshal.FreeHGlobal(ptr);
 
-                       // FIXME - debug this with Menus, need to set 
hwnd.ClientRect
+                       // FIXME - debug this with Menus
 
                        rect = new Rectangle(ncp.rgrc1.left, ncp.rgrc1.top, 
ncp.rgrc1.right - ncp.rgrc1.left, ncp.rgrc1.bottom - ncp.rgrc1.top);
+                       hwnd.ClientRect = rect;
 
                        if (hwnd.visible) {
                                if ((rect.Width < 1) || (rect.Height < 1)) {
@@ -3487,7 +3486,11 @@
                                width = hwnd.width;
                                height = hwnd.height;
 
-                               rect = 
Hwnd.GetClientRectangle(hwnd.border_style, hwnd.menu, hwnd.title_style, 
hwnd.caption_height, hwnd.tool_caption_height, width, height);
+                               if (hwnd.ClientRect.IsEmpty) {
+                                       rect = 
Hwnd.GetClientRectangle(hwnd.border_style, hwnd.menu, hwnd.title_style, 
hwnd.caption_height, hwnd.tool_caption_height, width, height);
+                               } else {
+                                       rect = hwnd.ClientRect;
+                               }
 
                                client_width = rect.Width;
                                client_height = rect.Height;
@@ -4270,12 +4273,15 @@
                                UnmapWindow(hwnd, WindowType.Whole);
                        }
 
-                       client_rect = 
Hwnd.GetClientRectangle(hwnd.border_style, hwnd.menu, hwnd.title_style, 
hwnd.caption_height, hwnd.tool_caption_height, width, height);
+                       if (hwnd.ClientRect.IsEmpty) {
+                               client_rect = 
Hwnd.GetClientRectangle(hwnd.border_style, hwnd.menu, hwnd.title_style, 
hwnd.caption_height, hwnd.tool_caption_height, width, height);
+                       } else {
+                               client_rect = hwnd.ClientRect;
+                       }
 
                        // Save a server roundtrip (and prevent a feedback loop)
                        if ((hwnd.x == x) && (hwnd.y == y) && 
-                               (hwnd.width == width) && (hwnd.height == 
height) &&
-                               (hwnd.ClientRect == client_rect)) {
+                               (hwnd.width == width) && (hwnd.height == 
height)) {
                                return;
                        }
 

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

Reply via email to