mirror of
https://github.com/labwc/labwc.git
synced 2026-02-10 04:27:47 -05:00
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:
parent
859eba1c6b
commit
0ca6c4c763
4 changed files with 16 additions and 54 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue