diff options
author | Stivvo <stivvo01@gmail.com> | 2020-10-31 13:00:54 +0100 |
---|---|---|
committer | Stivvo <stivvo01@gmail.com> | 2020-10-31 13:00:55 +0100 |
commit | 9f3f15b467a1ea723cd09d9943a27cfb50aa0af8 (patch) | |
tree | 57638562e049f3b87a52a4fbc899100146e23f27 | |
parent | 25671d79051e9054f64de88e77e089a2daf7008f (diff) |
Disable mon faster
Since focusmon() now never focuses disabled monitors, there's no need to
focus the disabled monitor first
-rw-r--r-- | dwl.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -1463,22 +1463,18 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, bool test) wl_list_for_each(config_head, &config->heads, link) { struct wlr_output *wlr_output = config_head->state.output; - Monitor *m, *newmon; + Monitor *m; + wlr_output_enable(wlr_output, config_head->state.enabled); if (!config_head->state.enabled) { wl_list_for_each(m, &mons, link) { if (m->wlr_output->name == wlr_output->name) { - // make sure that the monitor to clean is focused - selmon = m; - focusclient(selclient(), focustop(selmon), 1); - // focus the left monitor (relative to the current focus) focusmon(&ar); - closemon(m, wl_container_of(&selmon->link, newmon, link)); + closemon(m, selmon); } } } - wlr_output_enable(wlr_output, config_head->state.enabled); if (config_head->state.enabled) { if (config_head->state.mode) |