winex11: Don't process ConfigureNotify events that have been superseded by a later configure request.
This commit is contained in:
parent
f74e312bf8
commit
00b06dac85
|
@ -308,8 +308,8 @@ static inline void call_event_handler( Display *display, XEvent *event )
|
|||
hwnd = 0; /* not for a registered window */
|
||||
if (!hwnd && event->xany.window == root_window) hwnd = GetDesktopWindow();
|
||||
|
||||
TRACE( "%s for hwnd/window %p/%lx\n",
|
||||
dbgstr_event( event->type ), hwnd, event->xany.window );
|
||||
TRACE( "%lu %s for hwnd/window %p/%lx\n",
|
||||
event->xany.serial, dbgstr_event( event->type ), hwnd, event->xany.window );
|
||||
wine_tsx11_unlock();
|
||||
thread_data = x11drv_thread_data();
|
||||
prev = thread_data->current_event;
|
||||
|
@ -829,6 +829,13 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
|
|||
if (!hwnd) return;
|
||||
if (!(data = X11DRV_get_win_data( hwnd ))) return;
|
||||
if (!data->mapped || data->iconic || !data->managed) return;
|
||||
if (data->configure_serial && (long)(data->configure_serial - event->serial) > 0)
|
||||
{
|
||||
TRACE( "win %p/%lx event %d,%d,%dx%d ignoring old serial %lu/%lu\n",
|
||||
hwnd, data->whole_window, event->x, event->y, event->width, event->height,
|
||||
event->serial, data->configure_serial );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get geometry */
|
||||
|
||||
|
|
|
@ -1321,16 +1321,18 @@ static void sync_window_position( Display *display, struct x11drv_win_data *data
|
|||
/* and Above with a sibling doesn't work so well either, so we ignore it */
|
||||
}
|
||||
|
||||
TRACE( "setting win %p/%lx pos %d,%d,%dx%d after %lx changes=%x\n",
|
||||
data->hwnd, data->whole_window, data->whole_rect.left, data->whole_rect.top,
|
||||
data->whole_rect.right - data->whole_rect.left,
|
||||
data->whole_rect.bottom - data->whole_rect.top, changes.sibling, mask );
|
||||
|
||||
wine_tsx11_lock();
|
||||
set_size_hints( display, data, style );
|
||||
data->configure_serial = NextRequest( display );
|
||||
XReconfigureWMWindow( display, data->whole_window,
|
||||
DefaultScreen(display), mask, &changes );
|
||||
wine_tsx11_unlock();
|
||||
|
||||
TRACE( "win %p/%lx pos %d,%d,%dx%d after %lx changes=%x serial=%lu\n",
|
||||
data->hwnd, data->whole_window, data->whole_rect.left, data->whole_rect.top,
|
||||
data->whole_rect.right - data->whole_rect.left,
|
||||
data->whole_rect.bottom - data->whole_rect.top,
|
||||
changes.sibling, mask, data->configure_serial );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -741,6 +741,7 @@ struct x11drv_win_data
|
|||
BOOL shaped : 1; /* is window using a custom region shape? */
|
||||
int wm_state; /* current value of the WM_STATE property */
|
||||
DWORD net_wm_state; /* bit mask of active x11drv_net_wm_state values */
|
||||
unsigned long configure_serial; /* serial number of last configure request */
|
||||
HBITMAP hWMIconBitmap;
|
||||
HBITMAP hWMIconMask;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue