diff options
-rw-r--r-- | sway/desktop/xdg_shell.c | 4 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 0ac2c55d..843ff90a 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -293,7 +293,9 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
293 | new_geo.y != view->geometry.y; | 293 | new_geo.y != view->geometry.y; |
294 | 294 | ||
295 | if (new_size) { | 295 | if (new_size) { |
296 | // The view has unexpectedly sent a new size | 296 | // The client changed its surface size in this commit. For floating |
297 | // containers, we resize the container to match. For tiling containers, | ||
298 | // we only recenter the surface. | ||
297 | desktop_damage_view(view); | 299 | desktop_damage_view(view); |
298 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); | 300 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); |
299 | if (container_is_floating(view->container)) { | 301 | if (container_is_floating(view->container)) { |
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 5c3a39ea..14a93982 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -407,8 +407,9 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
407 | new_geo.y != view->geometry.y; | 407 | new_geo.y != view->geometry.y; |
408 | 408 | ||
409 | if (new_size) { | 409 | if (new_size) { |
410 | // The view has unexpectedly sent a new size | 410 | // The client changed its surface size in this commit. For floating |
411 | // eg. The Firefox "Save As" dialog when downloading a file | 411 | // containers, we resize the container to match. For tiling containers, |
412 | // we only recenter the surface. | ||
412 | desktop_damage_view(view); | 413 | desktop_damage_view(view); |
413 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); | 414 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); |
414 | if (container_is_floating(view->container)) { | 415 | if (container_is_floating(view->container)) { |