Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cat dwm.c.rej
- --- dwm.c
- +++ dwm.c
- @@ -427,6 +432,7 @@ buttonpress(XEvent *e)
- Client *c;
- Monitor *m;
- XButtonPressedEvent *ev = &e->xbutton;
- + char *text, *s, ch;
- click = ClkRootWin;
- /* focus monitor if necessary */
- @@ -445,9 +451,27 @@ buttonpress(XEvent *e)
- arg.ui = 1 << i;
- } else if (ev->x < x + TEXTW(selmon->ltsymbol))
- click = ClkLtSymbol;
- - else if (ev->x > selmon->ww - (int)TEXTW(stext))
- + else if (ev->x > selmon->ww - statusw) {
- + x = selmon->ww - statusw;
- click = ClkStatusText;
- - else
- + statussig = 0;
- + for (text = s = stext; *s && x <= ev->x; s++) {
- + if ((unsigned char)(*s) < ' ') {
- + ch = *s;
- + *s = '\0';
- + x += TEXTW(text) - lrpad;
- + *s = ch;
- + text = s + 1;
- + if (x >= ev->x)
- + break;
- + /* reset on matching signal raw byte */
- + if (ch == statussig)
- + statussig = 0;
- + else
- + statussig = ch;
- + }
- + }
- + } else
- click = ClkWinTitle;
- } else if ((c = wintoclient(ev->window))) {
- focus(c);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement