X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.c;h=4b43a18a6e7f8598ddcef86266e4fbf4b6fcc8c6;hp=670afbe695657ed27ac93d0d8d50255d4fc09d58;hb=83d10be1c1ffb301eaac3a775971f8e018c14cc4;hpb=62d3caa9990e4fd936850341095da4dd1bf4c846 diff --git a/dwm.c b/dwm.c index 670afbe..4b43a18 100644 --- a/dwm.c +++ b/dwm.c @@ -790,7 +790,6 @@ drawtext(const char *text, unsigned long col[ColLast], Bool invert) { void enternotify(XEvent *e) { - Client *c; Monitor *m; XCrossingEvent *ev = &e->xcrossing; @@ -800,10 +799,7 @@ enternotify(XEvent *e) { unfocus(selmon->sel, True); selmon = m; } - if((c = wintoclient(ev->window))) - focus(c); - else - focus(NULL); + focus(wintoclient(ev->window)); } void @@ -1791,7 +1787,6 @@ updategeom(void) { XineramaScreenInfo *info = XineramaQueryScreens(dpy, &nn); XineramaScreenInfo *unique = NULL; - info = XineramaQueryScreens(dpy, &nn); for(n = 0, m = mons; m; m = m->next, n++); /* only consider unique geometries as separate screens */ if(!(unique = (XineramaScreenInfo *)malloc(sizeof(XineramaScreenInfo) * nn)))