aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2021-02-23 00:46:45 +0100
committerSimon Ser <contact@emersion.fr>2021-02-23 19:38:05 +0100
commit95901d906ade2c6698eee1f956e105508a21ab79 (patch)
tree9602954d14269cfcf7deb19f6ce7d6b621cacd1c /sway
parent1989b18ff281cb75f0e62a20e663767a9e82e55d (diff)
shells: Update comment about size change on commit
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/xdg_shell.c4
-rw-r--r--sway/desktop/xwayland.c5
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) {
new_geo.y != view->geometry.y;
if (new_size) {
- // The view has unexpectedly sent a new size
+ // The client changed its surface size in this commit. For floating
+ // containers, we resize the container to match. For tiling containers,
+ // we only recenter the surface.
desktop_damage_view(view);
memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box));
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) {
new_geo.y != view->geometry.y;
if (new_size) {
- // The view has unexpectedly sent a new size
- // eg. The Firefox "Save As" dialog when downloading a file
+ // The client changed its surface size in this commit. For floating
+ // containers, we resize the container to match. For tiling containers,
+ // we only recenter the surface.
desktop_damage_view(view);
memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box));
if (container_is_floating(view->container)) {