mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-02-27 01:40:11 -05:00
fix: guard unfocusclient behind sloppyfocus
This commit is contained in:
parent
c32ae64c91
commit
033814d6ef
1 changed files with 4 additions and 1 deletions
5
dwl.c
5
dwl.c
|
|
@ -2064,10 +2064,13 @@ pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
|
||||||
sloppyfocus && time && c && !client_is_unmanaged(c))
|
sloppyfocus && time && c && !client_is_unmanaged(c))
|
||||||
focusclient(c, 0);
|
focusclient(c, 0);
|
||||||
|
|
||||||
|
/* Unfocus any focused clients if surface is NULL and focus should follow mouse */
|
||||||
|
if (!surface && sloppyfocus)
|
||||||
|
focusclient(NULL, 0);
|
||||||
|
|
||||||
/* If surface is NULL, clear pointer focus */
|
/* If surface is NULL, clear pointer focus */
|
||||||
if (!surface) {
|
if (!surface) {
|
||||||
wlr_seat_pointer_notify_clear_focus(seat);
|
wlr_seat_pointer_notify_clear_focus(seat);
|
||||||
focusclient(NULL, 0);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue