- move TSXGrabServer after a possible return FALSE;
- move misplaced comment - optimize TSXGrabServer use
This commit is contained in:
parent
2b560c75f9
commit
312303acaf
|
@ -394,10 +394,6 @@ static BOOL X11DRV_PALETTE_BuildSharedMap(void)
|
||||||
|
|
||||||
TRACE("Dynamic colormap... \n");
|
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
|
/* let's become the first client that actually follows
|
||||||
* X guidelines and does binary search...
|
* 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");
|
WARN("Out of memory while building system palette.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* comment this out if you want to debug palette init */
|
||||||
|
TSXGrabServer(display);
|
||||||
|
|
||||||
while( c_max - c_min > 0 )
|
while( c_max - c_min > 0 )
|
||||||
{
|
{
|
||||||
c_val = (c_max + c_min)/2 + (c_max + c_min)%2;
|
c_val = (c_max + c_min)/2 + (c_max + c_min)%2;
|
||||||
|
|
|
@ -88,7 +88,7 @@ static const BYTE lpGrayMask[] = { 0xAA, 0xA0,
|
||||||
* WIN_WindowNeedsWMBorder
|
* WIN_WindowNeedsWMBorder
|
||||||
*
|
*
|
||||||
* This method defines the rules for a window to have a WM border,
|
* 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 )
|
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 );
|
hdc = GetDCEx( wndPtr->parent->hwndSelf, 0, DCX_CACHE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* Grab the server only when moving top-level windows without desktop */
|
|
||||||
hdc = GetDC( 0 );
|
hdc = GetDC( 0 );
|
||||||
}
|
|
||||||
|
|
||||||
wndPtr->pDriver->pPreSizeMove(wndPtr);
|
|
||||||
|
|
||||||
if( iconic ) /* create a cursor for dragging */
|
if( iconic ) /* create a cursor for dragging */
|
||||||
{
|
{
|
||||||
|
@ -2121,6 +2117,8 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
|
||||||
if( !hDragCursor ) iconic = FALSE;
|
if( !hDragCursor ) iconic = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wndPtr->pDriver->pPreSizeMove(wndPtr);
|
||||||
|
|
||||||
/* invert frame if WIN31_LOOK to indicate mouse click on caption */
|
/* invert frame if WIN31_LOOK to indicate mouse click on caption */
|
||||||
if( !iconic && TWEAK_WineLook == WIN31_LOOK )
|
if( !iconic && TWEAK_WineLook == WIN31_LOOK )
|
||||||
if(!DragFullWindows)
|
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 );
|
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 );
|
ScreenToClient( wndPtr->parent->hwndSelf, &pt );
|
||||||
|
|
||||||
switch (uCommand)
|
switch (uCommand)
|
||||||
|
|
|
@ -852,6 +852,7 @@ void X11DRV_WND_SetFocus(WND *wndPtr)
|
||||||
*/
|
*/
|
||||||
void X11DRV_WND_PreSizeMove(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)))
|
if (!(wndPtr->dwStyle & WS_CHILD) && (X11DRV_GetXRootWindow() == DefaultRootWindow(display)))
|
||||||
TSXGrabServer( display );
|
TSXGrabServer( display );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue