view: Unify view_move()/view_move_resize()

view->impl->move() is a specific case of view->impl->configure().
To reduce code duplication, we can use view->impl->configure() for
pure moves (without resize) as well.

xwayland's move() function also possibly contained a race condition
when there was a pending resize, as it used the current surface
width/height rather than the pending width/height. This is fixed.
This commit is contained in:
John Lindgren 2023-02-09 01:07:07 -05:00 committed by Consolatis
parent 859eba1c6b
commit 0ca6c4c763
4 changed files with 16 additions and 54 deletions

View file

@ -143,9 +143,11 @@ void
view_move(struct view *view, int x, int y)
{
assert(view);
if (view->impl->move) {
view->impl->move(view, x, y);
}
view_move_resize(view, (struct wlr_box){
.x = x, .y = y,
.width = view->pending.width,
.height = view->pending.height
});
}
void