summaryrefslogtreecommitdiffstats
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-08-18 16:59:38 -0500
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-08-23 13:28:01 -0500
commit07bf1832bf2c435107f4664c82efc756f3fdd784 (patch)
tree6af390afaa17c0781b5c8b29fd9557732c517edc /dwl.c
parentset monitor for clients that don't have one on monitor creation (diff)
downloaddwl-07bf1832bf2c435107f4664c82efc756f3fdd784.tar.gz
dwl-07bf1832bf2c435107f4664c82efc756f3fdd784.tar.bz2
dwl-07bf1832bf2c435107f4664c82efc756f3fdd784.tar.xz
dwl-07bf1832bf2c435107f4664c82efc756f3fdd784.tar.zst
dwl-07bf1832bf2c435107f4664c82efc756f3fdd784.zip
set monitor for clients that don't have one in updatemons()
only if selmon is enabled and the clients are mapped
Diffstat (limited to '')
-rw-r--r--dwl.c6
1 files changed, 6 insertions, 0 deletions
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);
}