X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=client.c;h=6a231b90e5b4bfb49d5abad1ae4119103568f485;hb=666fae97e67810089ffbddd019d655bc4f9f7838;hp=ecfd8f0eaed7d36e535f6cf58740103f8afd51d9;hpb=d4b7a9a3735deeab639f28b5bb2f568e0dc49616;p=dwm.git 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