diff options
| -rw-r--r-- | dwm.c | 11 |
1 files changed, 4 insertions, 7 deletions
| @@ -551,8 +551,7 @@ drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]) { | |||
| 551 | 551 | ||
| 552 | void | 552 | void |
| 553 | drawtext(const char *text, ulong col[ColLast], Bool invert) { | 553 | drawtext(const char *text, ulong col[ColLast], Bool invert) { |
| 554 | int i, x, y, h; | 554 | int i, x, y, h, len, olen; |
| 555 | uint len, olen; | ||
| 556 | XRectangle r = { dc.x, dc.y, dc.w, dc.h }; | 555 | XRectangle r = { dc.x, dc.y, dc.w, dc.h }; |
| 557 | char buf[256]; | 556 | char buf[256]; |
| 558 | 557 | ||
| @@ -612,7 +611,7 @@ expose(XEvent *e) { | |||
| 612 | 611 | ||
| 613 | void | 612 | void |
| 614 | focus(Client *c) { | 613 | focus(Client *c) { |
| 615 | if(!c || (c && c->isbanned)) | 614 | if(!c || c->isbanned) |
| 616 | for(c = stack; c && c->isbanned; c = c->snext); | 615 | for(c = stack; c && c->isbanned; c = c->snext); |
| 617 | if(sel && sel != c) { | 616 | if(sel && sel != c) { |
| 618 | grabbuttons(sel, False); | 617 | grabbuttons(sel, False); |
| @@ -622,14 +621,12 @@ focus(Client *c) { | |||
| 622 | detachstack(c); | 621 | detachstack(c); |
| 623 | attachstack(c); | 622 | attachstack(c); |
| 624 | grabbuttons(c, True); | 623 | grabbuttons(c, True); |
| 625 | } | ||
| 626 | sel = c; | ||
| 627 | if(c) { | ||
| 628 | XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); | 624 | XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); |
| 629 | XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); | 625 | XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); |
| 630 | } | 626 | } |
| 631 | else | 627 | else |
| 632 | XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); | 628 | XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); |
| 629 | sel = c; | ||
| 633 | drawbar(); | 630 | drawbar(); |
| 634 | } | 631 | } |
| 635 | 632 | ||
| @@ -1565,8 +1562,8 @@ updatebar(void) { | |||
| 1565 | 1562 | ||
| 1566 | void | 1563 | void |
| 1567 | updategeom(void) { | 1564 | updategeom(void) { |
| 1568 | int i; | ||
| 1569 | #ifdef XINERAMA | 1565 | #ifdef XINERAMA |
| 1566 | int i; | ||
| 1570 | XineramaScreenInfo *info = NULL; | 1567 | XineramaScreenInfo *info = NULL; |
| 1571 | 1568 | ||
| 1572 | /* window area geometry */ | 1569 | /* window area geometry */ |
