aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.h10
-rw-r--r--dwl.c6
2 files changed, 16 insertions, 0 deletions
diff --git a/client.h b/client.h
index c091b81..c54a2f3 100644
--- a/client.h
+++ b/client.h
@@ -184,6 +184,16 @@ client_is_float_type(Client *c)
}
static inline int
+client_is_mapped(Client *c)
+{
+#ifdef XWAYLAND
+ if (client_is_x11(c))
+ return c->surface.xwayland->mapped;
+#endif
+ return c->surface.xdg->mapped;
+}
+
+static inline int
client_wants_fullscreen(Client *c)
{
#ifdef XWAYLAND
diff --git a/dwl.c b/dwl.c
index cf7d307..3a044d3 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2365,6 +2365,7 @@ updatemons(struct wl_listener *listener, void *data)
*/
struct wlr_output_configuration_v1 *config =
wlr_output_configuration_v1_create();
+ Client *c;
Monitor *m;
sgeom = *wlr_output_layout_get_box(output_layout, NULL);
wl_list_for_each(m, &mons, link) {
@@ -2388,6 +2389,11 @@ updatemons(struct wl_listener *listener, void *data)
config_head->state.y = m->m.y;
}
+ if (selmon && selmon->wlr_output->enabled)
+ wl_list_for_each(c, &clients, link)
+ if (!c->mon && client_is_mapped(c))
+ setmon(c, selmon, c->tags);
+
wlr_output_manager_v1_set_configuration(output_mgr, config);
}