Author: pbartok
Date: 2006-08-28 18:38:31 -0400 (Mon, 28 Aug 2006)
New Revision: 64503

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

        * XplatUIX11.cs: Preempt the roundtrip for getting the location back
          from X. Only send based on ConfigureNotify if we don't have the
          correct location in hwnd (if the window manager moved us)



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-08-28 21:53:09 UTC (rev 64502)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-08-28 22:38:31 UTC (rev 64503)
@@ -1,3 +1,9 @@
+2006-08-28  Peter Dennis Bartok  <[EMAIL PROTECTED]>
+
+       * XplatUIX11.cs: Preempt the roundtrip for getting the location back
+         from X. Only send based on ConfigureNotify if we don't have the
+         correct location in hwnd (if the window manager moved us)
+
 2006-08-28  Mike Kestner  <[EMAIL PROTECTED]>
 
        * ListView.cs: remove a TODO. 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-08-28 21:53:09 UTC (rev 64502)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-08-28 22:38:31 UTC (rev 64503)
@@ -3322,11 +3322,13 @@
                                                #if DriverDebugExtra
                                                        
Console.WriteLine("GetMessage(): Window {0:X} ConfigureNotify x={1} y={2} 
width={3} height={4}", hwnd.client_window.ToInt32(), xevent.ConfigureEvent.x, 
xevent.ConfigureEvent.y, xevent.ConfigureEvent.width, 
xevent.ConfigureEvent.height);
                                                #endif
-                                               SendMessage(msg.hwnd, 
Msg.WM_WINDOWPOSCHANGED, IntPtr.Zero, IntPtr.Zero);
-                                               hwnd.configure_pending = false;
+                                               if ((hwnd.x != 
xevent.ConfigureEvent.x) || (hwnd.y != xevent.ConfigureEvent.y) || (hwnd.width 
!= xevent.ConfigureEvent.width) || (hwnd.height != 
xevent.ConfigureEvent.height)) {
+                                                       SendMessage(msg.hwnd, 
Msg.WM_WINDOWPOSCHANGED, IntPtr.Zero, IntPtr.Zero);
+                                                       hwnd.configure_pending 
= false;
 
-                                               // We need to adjust our client 
window to track the resize of whole_window
-                                               PerformNCCalc(hwnd);
+                                                       // We need to adjust 
our client window to track the resize of whole_window
+                                                       PerformNCCalc(hwnd);
+                                               }
                                        }
                                        goto ProcessNextMessage;
                                }
@@ -4372,6 +4374,12 @@
                        }
 
                        if (!hwnd.zero_sized) {
+                               //Hack?
+                               hwnd.x = x;
+                               hwnd.y = y;
+                               hwnd.width = width;
+                               hwnd.height = height;
+                               SendMessage(hwnd.client_window, 
Msg.WM_WINDOWPOSCHANGED, IntPtr.Zero, IntPtr.Zero);
 
                                if (hwnd.fixed_size) {
                                        SetWindowMinMax(handle, 
Rectangle.Empty, new Size(width, height), new Size(width, height));

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

Reply via email to