From b8703d10b77137df34ee00ae26849c36f0b6b5e6 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 15 Jun 2025 13:16:36 +0800 Subject: [PATCH] opt: update mon not change selmon if the selmon not null --- src/maomao.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/maomao.c b/src/maomao.c index 8bcb1b3..ae6e1f5 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -7318,7 +7318,8 @@ void updatemons(struct wl_listener *listener, void *data) { config_head->state.x = m->m.x; config_head->state.y = m->m.y; - selmon = m; + if (!selmon) + selmon = m; wl_list_for_each(c, &clients, link) { if (c->mon && c->mon != m && client_surface(c)->mapped &&