From 9bcb11202e4eb027e3fa6fe69c576c02ba51cb83 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 3 Apr 2025 12:24:39 +0800 Subject: [PATCH] fix:miss change selmon when focus cross monitor --- maomao.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maomao.c b/maomao.c index b5776c1..aeb4c13 100644 --- a/maomao.c +++ b/maomao.c @@ -3283,6 +3283,11 @@ void focusclient(Client *c, int lift) { wlr_foreign_toplevel_handle_v1_set_activated(selmon->sel->foreign_toplevel, false); } + + if(c && !c->iskilling && c->mon) { + selmon = c->mon; + } + if (selmon) { selmon->prevsel = selmon->sel; selmon->sel = c;