dwm

git clone git://mattcarlson.org/repos/dwm.git
Log | Files | Refs

commit 1f0ea775fa78e49a3a62a17f26e7484cf62bf3b0
parent af2fbfdd34239fc9a3b726e298c7fac8cf0fe4ec
Author: Matthew Carlson <matt@mcarlson.xyz>
Date:   Mon, 23 Aug 2021 23:25:56 -0400

Merge branch 'notitle' into dwm

Diffstat:
Mconfig.h | 1-
Mdwm.c | 20+++++---------------
2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/config.h b/config.h @@ -205,7 +205,6 @@ static Button buttons[] = { // click event mask button function argument { ClkLtSymbol, 0, Button1, setlayout, {0} }, { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, - { ClkWinTitle, 0, Button2, zoom, {0} }, { ClkStatusText, 0, Button1, sigstatusbar, {.i = 1} }, { ClkStatusText, 0, Button2, sigstatusbar, {.i = 2} }, { ClkStatusText, 0, Button3, sigstatusbar, {.i = 3} }, diff --git a/dwm.c b/dwm.c @@ -73,8 +73,8 @@ enum { NetSupported, NetWMName, NetWMState, NetWMCheck, NetWMFullscreen, NetActiveWindow, NetWMWindowType, NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */ -enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, - ClkClientWin, ClkRootWin, ClkLast }; /* clicks */ +enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkClientWin, + ClkRootWin, ClkLast }; /* clicks */ typedef union { int i; @@ -588,7 +588,7 @@ buttonpress(XEvent *e) click = ClkLtSymbol; else if (ev->x > selmon->ww - statusw) { x = selmon->ww - statusw; - click = ClkStatusText; + click = ClkStatusText; statussig = 0; for (text = s = stext; *s && x <= ev->x; s++) { if ((unsigned char)(*s) < ' ') { @@ -603,7 +603,7 @@ buttonpress(XEvent *e) } } } else - click = ClkWinTitle; + click = ClkStatusText; } else if ((c = wintoclient(ev->window))) { focus(c); restack(selmon); @@ -918,15 +918,8 @@ drawbar(Monitor *m) x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); if ((w = m->ww - tw - x) > bh) { - if (m->sel) { - drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); - drw_text(drw, x, 0, w - 2 * sp, bh, lrpad / 2, m->sel->name, 0); - if (m->sel->isfloating) - drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0); - } else { drw_setscheme(drw, scheme[SchemeNorm]); drw_rect(drw, x, 0, w - 2 * sp, bh, 1, 1); - } } drw_map(drw, m->barwin, 0, 0, m->ww, bh); } @@ -1497,11 +1490,8 @@ propertynotify(XEvent *e) drawbars(); break; } - if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { + if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) updatetitle(c); - if (c == c->mon->sel) - drawbar(c->mon); - } if (ev->atom == netatom[NetWMWindowType]) updatewindowtype(c); }