diff options
| author | Rutherther <rutherther@proton.me> | 2024-05-04 20:59:51 +0200 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-06-20 17:49:25 -0600 | 
| commit | 16076ec5a40ed708b99f27100036a4a92b4fdd59 (patch) | |
| tree | 0e49dbf6c7a5809562d9b5ed9f9a52deda65b5fd /dwl.c | |
| parent | 7a46fccdba35b46d91226d10c1c9b90e43418c09 (diff) | |
fix: make sure selmon doesn't get set to disabled mon
Diffstat (limited to 'dwl.c')
| -rw-r--r-- | dwl.c | 7 | 
1 files changed, 7 insertions, 0 deletions
@@ -727,6 +727,9 @@ 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) { @@ -2789,6 +2792,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) {  | 
