Advertisement
Guest User

failed hunks

a guest
Feb 15th, 2025
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. cat dwm.c.rej
  2. --- dwm.c
  3. +++ dwm.c
  4. @@ -427,6 +432,7 @@ buttonpress(XEvent *e)
  5. Client *c;
  6. Monitor *m;
  7. XButtonPressedEvent *ev = &e->xbutton;
  8. + char *text, *s, ch;
  9.  
  10. click = ClkRootWin;
  11. /* focus monitor if necessary */
  12. @@ -445,9 +451,27 @@ buttonpress(XEvent *e)
  13. arg.ui = 1 << i;
  14. } else if (ev->x < x + TEXTW(selmon->ltsymbol))
  15. click = ClkLtSymbol;
  16. - else if (ev->x > selmon->ww - (int)TEXTW(stext))
  17. + else if (ev->x > selmon->ww - statusw) {
  18. + x = selmon->ww - statusw;
  19. click = ClkStatusText;
  20. - else
  21. + statussig = 0;
  22. + for (text = s = stext; *s && x <= ev->x; s++) {
  23. + if ((unsigned char)(*s) < ' ') {
  24. + ch = *s;
  25. + *s = '\0';
  26. + x += TEXTW(text) - lrpad;
  27. + *s = ch;
  28. + text = s + 1;
  29. + if (x >= ev->x)
  30. + break;
  31. + /* reset on matching signal raw byte */
  32. + if (ch == statussig)
  33. + statussig = 0;
  34. + else
  35. + statussig = ch;
  36. + }
  37. + }
  38. + } else
  39. click = ClkWinTitle;
  40. } else if ((c = wintoclient(ev->window))) {
  41. focus(c);
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement