refocus after unsetting fullscreen in mapnotify()

Since a6e2c15 focustop() prefers fullscreen clients, so the
focusclient(focustop(selmon)) in setmon() focuses the fullscreen client
before mapnotify() unsets its fullscreen state, and focus never moves to
the new client.
This commit is contained in:
Guido Cella
2026-11-05 20:21:05 +01:00
parent 4b76704af7
commit 15bff401c4
+4 -1
View File
@@ -2019,8 +2019,11 @@ mapnotify(struct wl_listener *listener, void *data)
unset_fullscreen:
m = c->mon ? c->mon : xytomon(c->geom.x, c->geom.y);
wl_list_for_each(w, &clients, link) {
if (w != c && w != p && w->isfullscreen && m == w->mon && (w->tags & c->tags))
if (w != c && w != p && w->isfullscreen && m == w->mon && (w->tags & c->tags)) {
setfullscreen(w, 0);
/* setmon() focused w because focustop() prefers fullscreen clients */
focusclient(focustop(selmon), NULL, 1);
}
}
}