opt: dont let window get pointer focus in overview

This commit is contained in:
DreamMaoMao 2026-05-16 15:13:39 +08:00
parent 92ed29efa5
commit f1f07525e5
3 changed files with 15 additions and 2 deletions

View file

@ -4816,7 +4816,13 @@ void pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
/* Let the client know that the mouse cursor has entered one
* of its surfaces, and make keyboard focus follow if desired.
* wlroots makes this a no-op if surface is already focused */
wlr_seat_pointer_notify_enter(seat, surface, sx, sy);
if (!c || !c->mon || !c->mon->isoverview) {
// don't let window get pointer focus,
// avoid game window force grab pointer in overview mode
wlr_seat_pointer_notify_enter(seat, surface, sx, sy);
}
wlr_seat_pointer_notify_motion(seat, time, sx, sy);
}