dwl

My patch set and modifications to dwl
git clone git://git.ethandl.dev/dwl
Log | Files | Refs | README | LICENSE

commit 4c0d59c1a724420bfd6d602c65d7ac6ab05e6eaf
parent 927352865c74dcefb7192b83a2cc81c5bbc54beb
Author: Stivvo <stivvo01@gmail.com>
Date:   Sun, 25 Oct 2020 11:16:37 +0100

Move clients away from a disabled monitor

When a monitor is disabled with wlr_randr, all clients on that monitor
aren't lost but they are moved to the leftmost monitor with the same
method that handles monitor hot unplug

Diffstat:
Mdwl.c | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/dwl.c b/dwl.c @@ -1465,6 +1465,15 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, bool test) struct wlr_output *wlr_output = config_head->state.output; wlr_output_enable(wlr_output, config_head->state.enabled); + if (!config_head->state.enabled) { + Monitor *m; + wl_list_for_each(m, &mons, link) { + if (m->wlr_output == wlr_output) { + closemon(m); + break; + } + } + } if (config_head->state.enabled) { if (config_head->state.mode) @@ -1491,8 +1500,7 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, bool test) wlr_output_configuration_v1_send_succeeded(config); if (!test) updatemons(); - } - else + } else wlr_output_configuration_v1_send_failed(config); wlr_output_configuration_v1_destroy(config); }