mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
src/xdg.c: sync move with pending resize
Before this patch, configuring a surface with a new size, immediately followed up by one or more view_move() calls would move the surface to the new coordinates immediately without waiting for the resize. This caused visual glitches when for example dragging a maximized window: the position would change but the size was still that of a maximized window. This patch fixes that by just ignoring view_move() requests (but still updating view->pending) if there is a configure request pending. Once the client commit comes in the new size will be applied as usual.
This commit is contained in:
parent
06e0771341
commit
ecd03b70ef
1 changed files with 7 additions and 3 deletions
10
src/xdg.c
10
src/xdg.c
|
|
@ -203,13 +203,17 @@ handle_set_app_id(struct wl_listener *listener, void *data)
|
|||
static void
|
||||
xdg_toplevel_view_move(struct view *view, int x, int y)
|
||||
{
|
||||
view->current.x = x;
|
||||
view->current.y = y;
|
||||
|
||||
/* override any previous pending move */
|
||||
view->pending.x = x;
|
||||
view->pending.y = y;
|
||||
|
||||
/* Syncs moves with resizes */
|
||||
if (view->pending_configure_serial > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
view->current.x = x;
|
||||
view->current.y = y;
|
||||
view_moved(view);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue