dwm-notitle-20210715-138b405.diff 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. From a3a7e94f59553689656871a65ea9ce90169a7c91 Mon Sep 17 00:00:00 2001
  2. From: birdalicous <jack.bird@durham.ac.uk>
  3. Date: Thu, 15 Jul 2021 12:28:29 +0100
  4. Subject: [PATCH] notitle patch applied#
  5. ---
  6. config.def.h | 1 -
  7. dwm.c | 20 ++++----------------
  8. 2 files changed, 4 insertions(+), 17 deletions(-)
  9. diff --git a/config.def.h b/config.def.h
  10. index a2ac963..eac20b4 100644
  11. --- a/config.def.h
  12. +++ b/config.def.h
  13. @@ -103,7 +103,6 @@ static Button buttons[] = {
  14. /* click event mask button function argument */
  15. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  16. { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
  17. - { ClkWinTitle, 0, Button2, zoom, {0} },
  18. { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
  19. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  20. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  21. diff --git a/dwm.c b/dwm.c
  22. index 5e4d494..6cd9fb7 100644
  23. --- a/dwm.c
  24. +++ b/dwm.c
  25. @@ -64,8 +64,8 @@ enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
  26. NetWMFullscreen, NetActiveWindow, NetWMWindowType,
  27. NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
  28. enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
  29. -enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
  30. - ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
  31. +enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkClientWin,
  32. + ClkRootWin, ClkLast }; /* clicks */
  33. typedef union {
  34. int i;
  35. @@ -440,10 +440,8 @@ buttonpress(XEvent *e)
  36. arg.ui = 1 << i;
  37. } else if (ev->x < x + blw)
  38. click = ClkLtSymbol;
  39. - else if (ev->x > selmon->ww - (int)TEXTW(stext))
  40. - click = ClkStatusText;
  41. else
  42. - click = ClkWinTitle;
  43. + click = ClkStatusText;
  44. } else if ((c = wintoclient(ev->window))) {
  45. focus(c);
  46. restack(selmon);
  47. @@ -730,15 +728,8 @@ drawbar(Monitor *m)
  48. x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
  49. if ((w = m->ww - tw - x) > bh) {
  50. - if (m->sel) {
  51. - drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
  52. - drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
  53. - if (m->sel->isfloating)
  54. - drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
  55. - } else {
  56. drw_setscheme(drw, scheme[SchemeNorm]);
  57. drw_rect(drw, x, 0, w, bh, 1, 1);
  58. - }
  59. }
  60. drw_map(drw, m->barwin, 0, 0, m->ww, bh);
  61. }
  62. @@ -1236,11 +1227,8 @@ propertynotify(XEvent *e)
  63. drawbars();
  64. break;
  65. }
  66. - if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
  67. + if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName])
  68. updatetitle(c);
  69. - if (c == c->mon->sel)
  70. - drawbar(c->mon);
  71. - }
  72. if (ev->atom == netatom[NetWMWindowType])
  73. updatewindowtype(c);
  74. }
  75. --
  76. 2.32.0