summaryrefslogtreecommitdiff
path: root/client.h
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2023-11-21 20:08:20 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2023-11-21 20:15:46 -0600
commita0e79d81452049aaad2d3081d9c689fb9f4253a8 (patch)
tree967f0add7ef66af1bd790f60ece9a7d58f87ae48 /client.h
parent32e66f45827cc8016ca2cef65ba61840f43fcc85 (diff)
Do not send repeated xdg_toplevel.configure_bounds
Fixes: 32e66f45827cc8016ca2cef65ba61840f43fcc85
Diffstat (limited to 'client.h')
-rw-r--r--client.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/client.h b/client.h
index b0f2900..71c7d76 100644
--- a/client.h
+++ b/client.h
@@ -112,8 +112,12 @@ client_set_bounds(Client *c, int32_t width, int32_t height)
return 0;
#endif
if (wl_resource_get_version(c->surface.xdg->toplevel->resource) >=
- XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION && width >= 0 && height >= 0)
+ XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION && width >= 0 && height >= 0
+ && (c->bounds.width != width || c->bounds.height != height)) {
+ c->bounds.width = width;
+ c->bounds.height = height;
return wlr_xdg_toplevel_set_bounds(c->surface.xdg->toplevel, width, height);
+ }
return 0;
}