X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/d4b7a9a3735deeab639f28b5bb2f568e0dc49616..19da197f58bc005ad379d751f28f0a17cea3d3b8:/client.c?ds=sidebyside diff --git a/client.c b/client.c index ecfd8f0..6a231b9 100644 --- a/client.c +++ b/client.c @@ -52,7 +52,6 @@ focus(Client *c) if (!issel) return; Client *old = sel; - XEvent ev; sel = c; if(old && old != c) @@ -263,11 +262,13 @@ manage(Window w, XWindowAttributes *wa) c->maxw == c->minw && c->maxh == c->minh); settitle(c); + if(isvisible(c)) + sel = c; + arrange(NULL); XMapWindow(dpy, c->win); XMapWindow(dpy, c->title); if(isvisible(c)) focus(c); - arrange(NULL); } void