mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Set node position in xdg/xwayland commit handlers
...in order to sync resize/move events to avoid left/bottom edge wobbling when resizing with top/left resize edges
This commit is contained in:
parent
581a2bb2f1
commit
f4c9d1ba9f
3 changed files with 8 additions and 3 deletions
|
|
@ -12,6 +12,8 @@ handle_commit(struct wl_listener *listener, void *data)
|
|||
/* Must receive commit signal before accessing surface->current* */
|
||||
view->w = view->surface->current.width;
|
||||
view->h = view->surface->current.height;
|
||||
bool move_pending = view->pending_move_resize.update_x
|
||||
|| view->pending_move_resize.update_y;
|
||||
|
||||
if (view->pending_move_resize.update_x) {
|
||||
view->x = view->pending_move_resize.x +
|
||||
|
|
@ -23,6 +25,10 @@ handle_commit(struct wl_listener *listener, void *data)
|
|||
view->pending_move_resize.height - view->h;
|
||||
view->pending_move_resize.update_y = false;
|
||||
}
|
||||
if (move_pending) {
|
||||
wlr_scene_node_set_position(&view->scene_tree->node,
|
||||
view->x, view->y);
|
||||
}
|
||||
ssd_update_geometry(view);
|
||||
damage_view_whole(view);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue