- move TSXGrabServer after a possible return FALSE;

- move misplaced comment
- optimize TSXGrabServer use
This commit is contained in:
Andreas Mohr 2001-02-12 18:10:27 +00:00 committed by Alexandre Julliard
parent 2b560c75f9
commit 312303acaf
3 changed files with 9 additions and 10 deletions

View File

@ -394,10 +394,6 @@ static BOOL X11DRV_PALETTE_BuildSharedMap(void)
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 @@ static BOOL X11DRV_PALETTE_BuildSharedMap(void)
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;

View File

@ -88,7 +88,7 @@ static const BYTE lpGrayMask[] = { 0xAA, 0xA0,
* 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 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
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 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
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 @@ LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT pt )
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)

View File

@ -852,6 +852,7 @@ void X11DRV_WND_SetFocus(WND *wndPtr)
*/
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 );
}