Move disabled clients to the left

To the nearest monitor to the left of the disabled one
This commit is contained in:
Stivvo 2020-10-30 23:33:10 +01:00
parent 806ebffe7d
commit 388ab9df2f

4
dwl.c
View File

@ -1459,13 +1459,13 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, bool test)
wl_list_for_each(config_head, &config->heads, link) { wl_list_for_each(config_head, &config->heads, link) {
struct wlr_output *wlr_output = config_head->state.output; struct wlr_output *wlr_output = config_head->state.output;
Monitor *m; Monitor *m, *newmon;
wlr_output_enable(wlr_output, config_head->state.enabled); wlr_output_enable(wlr_output, config_head->state.enabled);
if (!config_head->state.enabled) if (!config_head->state.enabled)
wl_list_for_each(m, &mons, link) wl_list_for_each(m, &mons, link)
if (m->wlr_output->name == wlr_output->name) if (m->wlr_output->name == wlr_output->name)
closemon(m); closemon(m, wl_container_of(m->link.next, newmon, link));
if (config_head->state.enabled) { if (config_head->state.enabled) {
if (config_head->state.mode) if (config_head->state.mode)