aboutsummaryrefslogtreecommitdiff
path: root/rootston/xdg_shell_v6.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-11-17 23:52:42 +0100
committeremersion <contact@emersion.fr>2017-11-17 23:52:42 +0100
commite2843d87c868341869cf905f6c77531e78d997ad (patch)
tree8367311bf184915614f1b4d7c385657b768d7ca5 /rootston/xdg_shell_v6.c
parent27937add762bb2594828ac678859bfdde4275f1e (diff)
Ensure to move the view when configured
Diffstat (limited to 'rootston/xdg_shell_v6.c')
-rw-r--r--rootston/xdg_shell_v6.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c
index f9c905dd..d91fc2d9 100644
--- a/rootston/xdg_shell_v6.c
+++ b/rootston/xdg_shell_v6.c
@@ -83,14 +83,13 @@ static void move_resize(struct roots_view *view, double x, double y,
x = x + width - constrained_width;
y = y + height - constrained_height;
- roots_surface->move_resize.needs_move = true;
roots_surface->move_resize.x = x;
roots_surface->move_resize.y = y;
roots_surface->move_resize.width = constrained_width;
roots_surface->move_resize.height = constrained_height;
- wlr_xdg_toplevel_v6_set_size(surface, constrained_width,
- constrained_height);
+ roots_surface->move_resize.configure_serial = wlr_xdg_toplevel_v6_set_size(
+ surface, constrained_width, constrained_height);
}
static void maximize(struct roots_view *view, bool maximized) {
@@ -159,12 +158,13 @@ static void handle_commit(struct wl_listener *listener, void *data) {
struct roots_view *view = roots_surface->view;
struct wlr_xdg_surface_v6 *surface = view->xdg_surface_v6;
- if (roots_surface->move_resize.needs_move) {
+ if (roots_surface->move_resize.configure_serial ==
+ surface->configure_serial) {
view->x = roots_surface->move_resize.x +
roots_surface->move_resize.width - surface->geometry->width;
view->y = roots_surface->move_resize.y +
roots_surface->move_resize.height - surface->geometry->height;
- roots_surface->move_resize.needs_move = false;
+ roots_surface->move_resize.configure_serial = 0;
}
}