summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Courtis <alex@courtis.org>2020-08-09 11:34:19 +1000
committerAlexander Courtis <alex@courtis.org>2020-08-09 11:34:19 +1000
commit95515682526dc786a9c2a668274a85be46b44d03 (patch)
tree3e3c616cb6d39e83ac292db6c00d49915ad60de2
parent9d138ac95a4575f61893278791d23bd70d02d286 (diff)
#31 independents retain focus while mouse is over them
-rw-r--r--dwl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/dwl.c b/dwl.c
index 15c446b..f5247b0 100644
--- a/dwl.c
+++ b/dwl.c
@@ -678,7 +678,7 @@ focusclient(Client *old, Client *c, int lift)
struct wlr_keyboard *kb = wlr_seat_get_keyboard(seat);
/* Raise client in stacking order if requested */
- if (c && c->type != X11Unmanaged && lift) {
+ if (c && lift) {
wl_list_remove(&c->slink);
wl_list_insert(&stack, &c->slink);
}
@@ -707,10 +707,8 @@ focusclient(Client *old, Client *c, int lift)
kb->keycodes, kb->num_keycodes, &kb->modifiers);
/* Put the new client atop the focus stack and select its monitor */
- if (c->type != X11Unmanaged) {
- wl_list_remove(&c->flink);
- wl_list_insert(&fstack, &c->flink);
- }
+ wl_list_remove(&c->flink);
+ wl_list_insert(&fstack, &c->flink);
selmon = c->mon;
/* Activate the new client */
@@ -1079,7 +1077,7 @@ pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
/* Otherwise, let the client know that the mouse cursor has entered one
* of its surfaces, and make keyboard focus follow if desired. */
wlr_seat_pointer_notify_enter(seat, surface, sx, sy);
- if (sloppyfocus)
+ if (sloppyfocus && c->type != X11Unmanaged)
focusclient(selclient(), c, 0);
}