diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-06-03 14:51:29 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-06-03 16:41:17 +0200 |
commit | f8dd7df1f510cdd2e53b25d2bb9a1edc19235e04 (patch) | |
tree | 1cd29d59d94383587f85d168fc0fda270dab209b /sway | |
parent | 5a4a7bc0dad1bb07312f41d6cce9b5a6fc8d884d (diff) |
shells: Resize on commit if geometry x/y changes
Client-side decorations lead to changes to y position, so make sure we
catch that.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/desktop/xdg_shell.c | 4 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 7775f660..2bf026f7 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -284,7 +284,9 @@ static void handle_commit(struct wl_listener *listener, void *data) { wlr_xdg_surface_get_geometry(xdg_surface, &new_geo); if ((new_geo.width != view->geometry.width || - new_geo.height != view->geometry.height)) { + new_geo.height != view->geometry.height || + new_geo.x != view->geometry.x || + new_geo.y != view->geometry.y)) { // The view has unexpectedly sent a new size desktop_damage_view(view); view_update_size(view, new_geo.width, new_geo.height); diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index b51bbb74..743e85bc 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -373,7 +373,9 @@ static void handle_commit(struct wl_listener *listener, void *data) { get_geometry(view, &new_geo); if ((new_geo.width != view->geometry.width || - new_geo.height != view->geometry.height)) { + new_geo.height != view->geometry.height || + new_geo.x != view->geometry.x || + new_geo.y != view->geometry.y)) { // The view has unexpectedly sent a new size // eg. The Firefox "Save As" dialog when downloading a file desktop_damage_view(view); |