X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=event.c;h=0133889cdeb2662100c093119bda3c3a7e7b39ce;hb=201c56f6d36e7f895c465f534fdb90e3d9e4ca18;hp=20c1533c6adc74132650351d57fb5a799d63c1b9;hpb=dee5ea23358ec0a9684265dc8cb1d2e4d56e9b84;p=dwm.git diff --git a/event.c b/event.c index 20c1533..0133889 100644 --- a/event.c +++ b/event.c @@ -234,9 +234,7 @@ enternotify(XEvent *e) { focus(c); else if(ev->window == root) { issel = True; - XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); - if(sel) - XSetWindowBorder(dpy, sel->win, dc.sel[ColBorder]); + focus(sel); } } @@ -273,9 +271,8 @@ leavenotify(XEvent *e) { XCrossingEvent *ev = &e->xcrossing; if((ev->window == root) && !ev->same_screen) { + focus(NULL); issel = False; - if(sel) - XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]); } }