Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
deciding for focus(NULL);
[dwm.git]
/
event.c
diff --git
a/event.c
b/event.c
index
75c3fa0
..
20ab599
100644
(file)
--- a/
event.c
+++ b/
event.c
@@
-235,6
+235,8
@@
enternotify(XEvent *e) {
else if(ev->window == root) {
issel = True;
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
else if(ev->window == root) {
issel = True;
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
+ if(sel)
+ focus(sel);
}
}
}
}
@@
-270,8
+272,11
@@
static void
leavenotify(XEvent *e) {
XCrossingEvent *ev = &e->xcrossing;
leavenotify(XEvent *e) {
XCrossingEvent *ev = &e->xcrossing;
- if((ev->window == root) && !ev->same_screen)
+ if((ev->window == root) && !ev->same_screen) {
+ if(sel)
+ focus(NULL);
issel = False;
issel = False;
+ }
}
static void
}
static void