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:
John Lindgren 2022-07-17 23:42:04 -04:00 committed by Johan Malm
parent a0a5cf706e
commit 065c37d3f5
4 changed files with 38 additions and 55 deletions

View file

@ -124,6 +124,11 @@ view_move(struct view *view, double x, double y)
if (view->impl->move) {
view->impl->move(view, x, y);
}
}
void
view_moved(struct view *view)
{
view_discover_output(view);
wlr_scene_node_set_position(&view->scene_tree->node, view->x, view->y);
ssd_update_geometry(view);
@ -136,8 +141,6 @@ view_move_resize(struct view *view, struct wlr_box geo)
if (view->impl->configure) {
view->impl->configure(view, geo);
}
ssd_update_title(view);
view_discover_output(view);
}
#define MIN_VIEW_WIDTH (100)