summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2023-07-23 20:59:29 -0600
committerLeonardo Hernández <leohdz172@proton.me>2023-07-31 18:19:41 -0600
commit78cf88670f3410782f5c90895c3c4586d3485a67 (patch)
treea38586d28ae440eb5118612a88087f7d9d303ee5
parentce997c4a21e96716982f491718eef08f95425ab4 (diff)
add support for xdg-shell v6
-rw-r--r--client.h11
-rw-r--r--dwl.c9
2 files changed, 17 insertions, 3 deletions
diff --git a/client.h b/client.h
index ef56ee6..fc999f1 100644
--- a/client.h
+++ b/client.h
@@ -346,6 +346,17 @@ client_set_tiled(Client *c, uint32_t edges)
wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges);
}
+static inline void
+client_set_suspended(Client *c, int suspended)
+{
+#ifdef XWAYLAND
+ if (client_is_x11(c))
+ return;
+#endif
+
+ wlr_xdg_toplevel_set_suspended(c->surface.xdg->toplevel, suspended);
+}
+
static inline struct wlr_surface *
client_surface_at(Client *c, double cx, double cy, double *sx, double *sy)
{
diff --git a/dwl.c b/dwl.c
index 436d082..91abe11 100644
--- a/dwl.c
+++ b/dwl.c
@@ -457,9 +457,12 @@ void
arrange(Monitor *m)
{
Client *c;
- wl_list_for_each(c, &clients, link)
- if (c->mon == m)
+ wl_list_for_each(c, &clients, link) {
+ if (c->mon == m) {
wlr_scene_node_set_enabled(&c->scene->node, VISIBLEON(c, m));
+ client_set_suspended(c, !VISIBLEON(c, m));
+ }
+ }
wlr_scene_node_set_enabled(&m->fullscreen_bg->node,
(c = focustop(m)) && c->isfullscreen);
@@ -2257,7 +2260,7 @@ setup(void)
layer_shell = wlr_layer_shell_v1_create(dpy, 3);
LISTEN_STATIC(&layer_shell->events.new_surface, createlayersurface);
- xdg_shell = wlr_xdg_shell_create(dpy, 5);
+ xdg_shell = wlr_xdg_shell_create(dpy, 6);
LISTEN_STATIC(&xdg_shell->events.new_surface, createnotify);
session_lock_mgr = wlr_session_lock_manager_v1_create(dpy);