summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-06 13:56:46 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-06 13:59:14 -0600
commitd42a977b5ba8ae09753c7f6fcf4e2044bac7d92e (patch)
tree39d275f3cb6027a827dd0ca9d20139ee421a2936
parent4a32293548667e68cd9a103e22368b8db1754deb (diff)
Revert "remove unneeded changes in commitnotify()"
This reverts commit 30c24a53ad2aaa842bc3b028ba0b98e3362dad7c. Bug: https://github.com/djpohly/dwl/issues/349
-rw-r--r--dwl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index a1f579a..d1f39d5 100644
--- a/dwl.c
+++ b/dwl.c
@@ -730,9 +730,14 @@ commitnotify(struct wl_listener *listener, void *data)
struct wlr_box box = {0};
client_get_geometry(c, &box);
+ if (c->mon && !wlr_box_empty(&box) && (box.width != c->geom.width - 2 * c->bw
+ || box.height != c->geom.height - 2 * c->bw))
+ arrange(c->mon);
/* mark a pending resize as completed */
- if (c->resize && (c->resize <= c->surface.xdg->current.configure_serial))
+ if (c->resize && (c->resize <= c->surface.xdg->current.configure_serial
+ || (c->surface.xdg->current.geometry.width == c->surface.xdg->pending.geometry.width
+ && c->surface.xdg->current.geometry.height == c->surface.xdg->pending.geometry.height)))
c->resize = 0;
}