commit - 92fe06b501a5458a6aecdcc53f8d35c2a1f55c1c
commit + 3a392b855882786d1aa9c842d1c36b5c1cbc576a
blob - 267527d24c2b31fa80544631b9e052b302adc25d
blob + fd1837f4f38be02769e54e4ffb77d8bd180b3674
--- BUGS
+++ BUGS
---
-> enternotify is handled even when the entered window is already focused
-> (eg moving the mouse to the bar and back, scrolling on the border..)
->
-> focusing might be expensive for some clients (eg dim/light up)
->
-> a possible solution is to modify enternotify:
->
-> + c = wintoclient(ev->window);
-> if((m = wintomon(ev->window)) && m != selmon) {
-> unfocus(selmon->sel);
-> selmon = m;
-> }
-> + else if (c == selmon->sel || c == NULL)
-> + return;
-
----
-
-dmenu appears on the monitor where the pointer is and not on selmon
-
----
-
yet another corner case:
open a terminal, focus another monitor, but without moving the mouse
pointer there
blob - 84c0ae67259282a72668de0ee46965ce8f9977e2
blob + 8c1adeb593b7267b4ee37363787517e16c633af8
--- dwm.c
+++ dwm.c
void
enternotify(XEvent *e) {
+ Client *c;
Monitor *m;
XCrossingEvent *ev = &e->xcrossing;
if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
return;
+ c = wintoclient(ev->window);
if((m = wintomon(ev->window)) && m != selmon) {
unfocus(selmon->sel, True);
selmon = m;
}
+ else if(c == selmon->sel || c == NULL)
+ return;
focus((wintoclient(ev->window)));
}