aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorStivvo <stivvo01@gmail.com>2020-10-30 22:32:00 +0100
committerStivvo <stivvo01@gmail.com>2020-10-30 22:35:05 +0100
commit4deeddceffde88bd117411fb856e86a7d92e456a (patch)
treeb950d0814b554b3022b2527eda2b64c3b8a129ed /dwl.c
parent874a4df38935ec33a9774c38cf7b37997423a38f (diff)
Actually move clients away from a disabled mon
When using wlr-randr every monitor's configuration is reevaluated, so it must check which monitors are actually being disabled. The only way to correctly do that is to compare the names.
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/dwl.c b/dwl.c
index b70a217..715cb5e 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1466,21 +1466,10 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, bool test)
Monitor *m;
wlr_output_enable(wlr_output, config_head->state.enabled);
- if (!wlr_output->enabled) {
- wl_list_for_each(m, &mons, link) {
- if (m->wlr_output == wlr_output) {
- wlr_output_set_mode(m->wlr_output, wlr_output_preferred_mode(m->wlr_output));
- break;
- }
- }
- } else {
- wl_list_for_each(m, &mons, link) {
- if (m->wlr_output == wlr_output) {
+ if (!config_head->state.enabled)
+ wl_list_for_each(m, &mons, link)
+ if (m->wlr_output->name == wlr_output->name)
closemon(m);
- break;
- }
- }
- }
if (config_head->state.enabled) {
if (config_head->state.mode)