A window size/move fix (repost)

Paul McNett p at ulmcnett.com
Thu Feb 27 12:26:09 CST 2003


On Tuesday 18 February 2003 02:47 pm, Alexandre Julliard wrote:

> > Changelog:
> >       Before changing window size/pos, handle pending ConfigureNotify
> > events.
>
> That's only hiding the problem, and only in some cases. There is no
> guarantee that the ConfigureNotify has arrived by the time we do the
> resize, so we need to cope with a ConfigureNotify arriving at any
> time.

Given that resolving this problem in the correct way will be complex 
and happen over the long term, and that Duane's very simple patch 
does indeed resolve the bugs in question:

http://bugs.winehq.com/show_bug.cgi?id=1265
http://bugs.winehq.com/show_bug.cgi?id=1266

while not adversely affecting other applications, would you consider 
committing this patch anyway?  In the future, when ConfigureNotify 
events are properly handled and the Wine code is being optimized, 
this code can be removed as it will be redundant.  Until then, it does 
make Visual FoxPro appear to behave correctly, which is an 
important selling point for me in trying to convince other VFP 
developers to move to Linux/Wine.

Thanks for your time and consideration Alexandre, and kudos to 
you and all the other Wine developers for bringing the product to 
its current quite usable and functional state!

For your reference, here is a link to the patch in question:
http://www.winehq.com/hypermail/wine-patches/2003/02/0159.html

And here is a text copy of the actual patch:


Changelog:
        Before changing window size/pos, handle pending ConfigureNotify events.


Index: dlls/x11drv/winpos.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/winpos.c,v
retrieving revision 1.63
diff -u -r1.63 winpos.c
--- dlls/x11drv/winpos.c        8 Jan 2003 21:09:26 -0000       1.63
+++ dlls/x11drv/winpos.c        10 Feb 2003 22:33:20 -0000
@@ -887,6 +887,9 @@
     UINT wvrFlags = 0;
     BOOL bChangePos;
 
+    /* This is needed to flush pending X ConfigureNotify events on this window */
+    MsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 );
+    
     TRACE( "hwnd %p, swp (%i,%i)-(%i,%i) flags %08x\n",
            winpos->hwnd, winpos->x, winpos->y,
            winpos->x + winpos->cx, winpos->y + winpos->cy, winpos->flags);


-- 
Paul McNett - p at ulmcnett.com
Hollister, California, USA



More information about the wine-devel mailing list