(TS)XGrabServer
Andreas Mohr
amohr at codeweavers.com
Thu Feb 1 09:17:33 CST 2001
Hi all,
(TS)XGrabServer use was kinda broken.
- move TSXGrabServer *after* a possible return FALSE;
- move misplaced comment
- optimize TSXGrabServer use
Andreas Mohr
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at wine.codeweavers.com:/home/cvs/wine
Index: graphics/x11drv/palette.c
===================================================================
RCS file: /home/cvs/wine/wine/graphics/x11drv/palette.c,v
retrieving revision 1.18
diff -u -r1.18 palette.c
--- graphics/x11drv/palette.c 2000/11/05 02:05:10 1.18
+++ graphics/x11drv/palette.c 2001/02/02 00:56:10
@@ -394,10 +394,6 @@
TRACE("Dynamic colormap... \n");
- /* comment this out if you want to debug palette init */
-
- TSXGrabServer(display);
-
/* let's become the first client that actually follows
* X guidelines and does binary search...
*/
@@ -406,6 +402,10 @@
WARN("Out of memory while building system palette.\n");
return FALSE;
}
+
+ /* comment this out if you want to debug palette init */
+ TSXGrabServer(display);
+
while( c_max - c_min > 0 )
{
c_val = (c_max + c_min)/2 + (c_max + c_min)%2;
Index: windows/nonclient.c
===================================================================
RCS file: /home/cvs/wine/wine/windows/nonclient.c,v
retrieving revision 1.70
diff -u -r1.70 nonclient.c
--- windows/nonclient.c 2001/01/24 19:47:57 1.70
+++ windows/nonclient.c 2001/02/02 00:56:10
@@ -88,7 +88,7 @@
* WIN_WindowNeedsWMBorder
*
* This method defines the rules for a window to have a WM border,
- * caption... It is used for consitency purposes.
+ * caption... It is used for consistency purposes.
*/
BOOL WIN_WindowNeedsWMBorder( DWORD style, DWORD exStyle )
{
@@ -2107,11 +2107,7 @@
hdc = GetDCEx( wndPtr->parent->hwndSelf, 0, DCX_CACHE );
}
else
- { /* Grab the server only when moving top-level windows without desktop */
hdc = GetDC( 0 );
- }
-
- wndPtr->pDriver->pPreSizeMove(wndPtr);
if( iconic ) /* create a cursor for dragging */
{
@@ -2121,6 +2117,8 @@
if( !hDragCursor ) iconic = FALSE;
}
+ wndPtr->pDriver->pPreSizeMove(wndPtr);
+
/* invert frame if WIN31_LOOK to indicate mouse click on caption */
if( !iconic && TWEAK_WineLook == WIN31_LOOK )
if(!DragFullWindows)
@@ -2695,7 +2693,7 @@
TRACE("Handling WM_SYSCOMMAND %x %ld,%ld\n", wParam, pt.x, pt.y );
- if (wndPtr->dwStyle & WS_CHILD && uCommand != SC_KEYMENU )
+ if ((wndPtr->dwStyle & WS_CHILD) && (uCommand != SC_KEYMENU))
ScreenToClient( wndPtr->parent->hwndSelf, &pt );
switch (uCommand)
Index: windows/x11drv/wnd.c
===================================================================
RCS file: /home/cvs/wine/wine/windows/x11drv/wnd.c,v
retrieving revision 1.64
diff -u -r1.64 wnd.c
--- windows/x11drv/wnd.c 2001/01/15 20:22:31 1.64
+++ windows/x11drv/wnd.c 2001/02/02 00:56:10
@@ -852,6 +852,7 @@
*/
void X11DRV_WND_PreSizeMove(WND *wndPtr)
{
+ /* Grab the server only when moving top-level windows without desktop */
if (!(wndPtr->dwStyle & WS_CHILD) && (X11DRV_GetXRootWindow() == DefaultRootWindow(display)))
TSXGrabServer( display );
}
More information about the wine-patches
mailing list