From a9e1cd42017e6e9a4fa7008e04a8aa66b7ac5a68 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Mon, 18 Jan 2021 15:38:25 -0600 Subject: remove hacky code from output-management handler This functionality belongs in updatemons(), where it can hopefully be written a bit more elegantly. --- dwl.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dwl.c b/dwl.c index ef51b0c..7f8b719 100644 --- a/dwl.c +++ b/dwl.c @@ -1532,17 +1532,6 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test) config_head->state.x, config_head->state.y); wlr_output_set_transform(wlr_output, config_head->state.transform); wlr_output_set_scale(wlr_output, config_head->state.scale); - } else if (wl_list_length(&mons) > 1) { - Monitor *m; - wl_list_for_each(m, &mons, link) { - if (m->wlr_output->name == wlr_output->name) { - // focus the left monitor (relative to the current focus) - m->wlr_output->enabled = !m->wlr_output->enabled; - focusmon(&(Arg) {.i = -1}); - closemon(m); - m->wlr_output->enabled = !m->wlr_output->enabled; - } - } } if (!(ok = wlr_output_test(wlr_output))) @@ -2294,6 +2283,9 @@ updatemons(struct wl_listener *listener, void *data) struct wlr_output_configuration_head_v1 *config_head = wlr_output_configuration_head_v1_create(config, m->wlr_output); + /* TODO: move clients off disabled monitors */ + /* TODO: move focus if selmon is disabled */ + /* Get the effective monitor geometry to use for surfaces */ m->m = m->w = *wlr_output_layout_get_box(output_layout, m->wlr_output); /* Calculate the effective monitor geometry to use for clients */ -- cgit v1.2.3