view: fix bug in view_snap_to_edge()

Use view_move() and view_move_resize() correctly.

view_move_resize() should only be used when the view actually changes
width and/or height, otherwise the serials might cause a delay in moving
xdg-shell clients.

Issue #201
This commit is contained in:
Johan Malm 2022-01-07 20:53:48 +00:00
parent cef9723505
commit be89478f7a
2 changed files with 28 additions and 11 deletions

View file

@ -368,6 +368,15 @@ void view_subsurface_create(struct view *view,
void view_set_activated(struct view *view, bool activated);
void view_close(struct view *view);
struct border view_border(struct view *view);
/**
* view_move_resize - resize and move view
* @view: view to be resized and moved
* @geo: the new geometry
* NOTE: Only use this when the view actually changes width and/or height
* otherwise the serials might cause a delay in moving xdg-shell clients.
* For move only, use view_move()
*/
void view_move_resize(struct view *view, struct wlr_box geo);
void view_move(struct view *view, double x, double y);
void view_minimize(struct view *view, bool minimized);