mirror of
https://github.com/labwc/labwc.git
synced 2026-02-24 01:40:15 -05:00
xwayland: Process move-only client configure requests more quickly
For a move-only client configure request, treat it similarly to view_move() by updating the scene-graph immediately, rather than waiting for handle_commit(). Move-and-resize requests are handled the same as before. This (mostly?) fixes the glitchiness that was noticeable when dragging an undecorated XWayland window (e.g. Audacious in Winamp mode). Also: - Reduce some code duplication in handle_request_configure() by simply calling configure(), as suggested by @johanmalm in #428. - Factor out common logic after a move and/or resize into view_moved().
This commit is contained in:
parent
a0a5cf706e
commit
065c37d3f5
4 changed files with 38 additions and 55 deletions
|
|
@ -57,8 +57,7 @@ handle_commit(struct wl_listener *listener, void *data)
|
|||
view->pending_move_resize.configure_serial = 0;
|
||||
}
|
||||
}
|
||||
wlr_scene_node_set_position(&view->scene_tree->node, view->x, view->y);
|
||||
ssd_update_geometry(view);
|
||||
view_moved(view);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -182,9 +181,7 @@ xdg_toplevel_view_configure(struct view *view, struct wlr_box geo)
|
|||
} else if (view->pending_move_resize.configure_serial == 0) {
|
||||
view->x = geo.x;
|
||||
view->y = geo.y;
|
||||
wlr_scene_node_set_position(&view->scene_tree->node,
|
||||
view->x, view->y);
|
||||
ssd_update_geometry(view);
|
||||
view_moved(view);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -193,6 +190,7 @@ xdg_toplevel_view_move(struct view *view, double x, double y)
|
|||
{
|
||||
view->x = x;
|
||||
view->y = y;
|
||||
view_moved(view);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue