dwm-notitle-6.5.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       dwm-notitle-6.5.diff (3042B)
       ---
            1 From 7cab928170856474fabc30a62df50b4b79536fb9 Mon Sep 17 00:00:00 2001
            2 From: Jason Pena <jasonpena@awkless.com>
            3 Date: Wed, 4 Jun 2025 12:51:42 -0600
            4 Subject: [PATCH] Resolve patch conflicts for release 6.5
            5 
            6 Resolve patch conflict for `buttonpress` in release version 6.5 of DWM
            7 produced by `dwm-notitle-20210715-138b405.diff`.
            8 
            9 Signed-off-by: Jason Pena <jasonpena@awkless.com>
           10 ---
           11  config.def.h |  1 -
           12  dwm.c        | 18 ++++--------------
           13  2 files changed, 4 insertions(+), 15 deletions(-)
           14 
           15 diff --git a/config.def.h b/config.def.h
           16 index 9efa774..4a415af 100644
           17 --- a/config.def.h
           18 +++ b/config.def.h
           19 @@ -103,7 +103,6 @@ static const Button buttons[] = {
           20          /* click                event mask      button          function        argument */
           21          { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
           22          { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
           23 -        { ClkWinTitle,          0,              Button2,        zoom,           {0} },
           24          { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
           25          { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
           26          { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
           27 diff --git a/dwm.c b/dwm.c
           28 index 1443802..e3f0281 100644
           29 --- a/dwm.c
           30 +++ b/dwm.c
           31 @@ -63,8 +63,8 @@ enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
           32         NetWMFullscreen, NetActiveWindow, NetWMWindowType,
           33         NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
           34  enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
           35 -enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
           36 -       ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
           37 +enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkClientWin,
           38 +       ClkRootWin, ClkLast }; /* clicks */
           39  
           40  typedef union {
           41          int i;
           42 @@ -443,7 +443,7 @@ buttonpress(XEvent *e)
           43                  else if (ev->x > selmon->ww - (int)TEXTW(stext))
           44                          click = ClkStatusText;
           45                  else
           46 -                        click = ClkWinTitle;
           47 +                        click = ClkStatusText;
           48          } else if ((c = wintoclient(ev->window))) {
           49                  focus(c);
           50                  restack(selmon);
           51 @@ -734,15 +734,8 @@ drawbar(Monitor *m)
           52          x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
           53  
           54          if ((w = m->ww - tw - x) > bh) {
           55 -                if (m->sel) {
           56 -                        drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
           57 -                        drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
           58 -                        if (m->sel->isfloating)
           59 -                                drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
           60 -                } else {
           61                          drw_setscheme(drw, scheme[SchemeNorm]);
           62                          drw_rect(drw, x, 0, w, bh, 1, 1);
           63 -                }
           64          }
           65          drw_map(drw, m->barwin, 0, 0, m->ww, bh);
           66  }
           67 @@ -1244,11 +1237,8 @@ propertynotify(XEvent *e)
           68                          drawbars();
           69                          break;
           70                  }
           71 -                if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
           72 +                if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName])
           73                          updatetitle(c);
           74 -                        if (c == c->mon->sel)
           75 -                                drawbar(c->mon);
           76 -                }
           77                  if (ev->atom == netatom[NetWMWindowType])
           78                          updatewindowtype(c);
           79          }
           80 -- 
           81 2.49.0
           82