aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-05-06 18:05:04 +0000
committerSimon Ser <contact@emersion.fr>2022-08-04 12:23:03 +0000
commit129e1a9b8e23007026d19c970941ccbc8ee2f0ca (patch)
treea3d4576ff65056d387fc8914c4ffefd27a27a8da /render.c
parentAdd no-op xdg_toplevel.configure_bounds handler (diff)
Add support for xdg_toplevel.wm_capabilities
See https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/122
Diffstat (limited to 'render.c')
-rw-r--r--render.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/render.c b/render.c
index 9333deb7..ff82802e 100644
--- a/render.c
+++ b/render.c
@@ -1726,10 +1726,12 @@ get_csd_data(const struct terminal *term, enum csd_surface surf_idx)
const int button_close_width = term->width >= 1 * button_width
? button_width : 0;
- const int button_maximize_width = term->width >= 2 * button_width
+ const int button_maximize_width =
+ term->width >= 2 * button_width && term->window->wm_capabilities.maximize
? button_width : 0;
- const int button_minimize_width = term->width >= 3 * button_width
+ const int button_minimize_width =
+ term->width >= 3 * button_width && term->window->wm_capabilities.minimize
? button_width : 0;
switch (surf_idx) {