~ruther/dwl

7e767f7367b268a6c08751592c60d388865ba208 — Rutherther 11 months ago 577d8da
fix: make sure selmon doesn't get set to disabled mon
1 files changed, 8 insertions(+), 0 deletions(-)

M dwl.c
M dwl.c => dwl.c +8 -0
@@ 716,6 716,10 @@ closemon(Monitor *m)
		do /* don't switch to disabled mons */
			selmon = wl_container_of(mons.next, selmon, link);
		while (!selmon->wlr_output->enabled && i++ < nmons);

		if (!selmon->wlr_output->enabled) {
			selmon = NULL;
		}
	}

	wl_list_for_each(c, &clients, link) {


@@ 2773,6 2777,10 @@ updatemons(struct wl_listener *listener, void *data)

		config_head->state.x = m->m.x;
		config_head->state.y = m->m.y;

		if (!selmon) {
			selmon = m;
		}
	}

	if (selmon && selmon->wlr_output->enabled) {

Do not follow this link