X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/3b18f17d4d4f2d7502f52346cbd158b7120fd835..dee5ea23358ec0a9684265dc8cb1d2e4d56e9b84:/event.c diff --git a/event.c b/event.c index 75c3fa0..20c1533 100644 --- 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); + if(sel) + XSetWindowBorder(dpy, sel->win, dc.sel[ColBorder]); } } @@ -270,8 +272,11 @@ static void leavenotify(XEvent *e) { XCrossingEvent *ev = &e->xcrossing; - if((ev->window == root) && !ev->same_screen) + if((ev->window == root) && !ev->same_screen) { issel = False; + if(sel) + XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]); + } } static void