X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=75c3fa0833bc313eff5ab9198cc9800ce6073065;hb=9715ba82aa4d256a43b3a166c88f3409b873eb32;hp=2deef143a55f2543ff71f6416a0ae0461bf74a2d;hpb=653826572d5dfe36fc567b2fdce7ef5d9ad0bfbc;p=dwm.git diff --git a/event.c b/event.c index 2deef14..75c3fa0 100644 --- a/event.c +++ b/event.c @@ -196,7 +196,7 @@ configurerequest(XEvent *e) { if(c->isfloat) { resize(c, False, TopLeft); if(!isvisible(c)) - ban(c); + XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); } else arrange(); @@ -230,25 +230,21 @@ enternotify(XEvent *e) { if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) return; - if(((c = getclient(ev->window)) || (c = getctitle(ev->window))) && isvisible(c)) + if((c = getclient(ev->window)) && isvisible(c)) focus(c); else if(ev->window == root) { issel = True; XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); - drawall(); } } static void expose(XEvent *e) { - Client *c; XExposeEvent *ev = &e->xexpose; if(ev->count == 0) { if(barwin == ev->window) drawstatus(); - else if((c = getctitle(ev->window))) - drawclient(c); } } @@ -274,10 +270,8 @@ 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; - drawall(); - } } static void @@ -331,8 +325,8 @@ propertynotify(XEvent *e) { } if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { updatetitle(c); - resizetitle(c); - drawclient(c); + if(c == sel) + drawstatus(); } } }