diff options
author | emersion <contact@emersion.fr> | 2017-11-20 12:16:10 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-11-20 12:16:10 +0100 |
commit | 272e0858e49bf341b363fdbe59a5f669ba678ce2 (patch) | |
tree | ce75f5f94aa42ffe4344b76b7aac24c853ac4ac4 /rootston/desktop.c | |
parent | 0153a0ed8fb934333505ee7793b1c493d8d0cd35 (diff) |
Fix laggy move-resize for wl-shell views
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r-- | rootston/desktop.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index b3287ed0..c6a1957c 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -103,7 +103,9 @@ void view_resize(struct roots_view *view, uint32_t width, uint32_t height) { void view_move_resize(struct roots_view *view, double x, double y, uint32_t width, uint32_t height) { - if (x == view->x && y == view->y) { + bool update_x = x != view->x; + bool update_y = y != view->y; + if (!update_x && !update_y) { view_resize(view, width, height); return; } @@ -113,7 +115,13 @@ void view_move_resize(struct roots_view *view, double x, double y, return; } - view_move(view, x, y); + view->pending_move_resize.update_x = update_x; + view->pending_move_resize.update_y = update_y; + view->pending_move_resize.x = x; + view->pending_move_resize.y = y; + view->pending_move_resize.width = width; + view->pending_move_resize.height = height; + view_resize(view, width, height); } |