sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 5e65dd8e79538229c830ba96008f636a98e35555
parent 9118a8ae46f9bcc43e116956098200b348455b1b
Author: Filip Ivetić <filip.ivetic@gmail.com>
Date:   Mon, 16 Jul 2018 20:04:14 +0200

tabbed autohide patch update

Diffstat:
Mtools.suckless.org/tabbed/patches/autohide.md | 2++
Atools.suckless.org/tabbed/patches/tabbed-autohide-20180716.diff | 50++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/tools.suckless.org/tabbed/patches/autohide.md b/tools.suckless.org/tabbed/patches/autohide.md @@ -8,6 +8,7 @@ Download * [tabbed-0.4.1-autohide.diff](tabbed-0.4.1-autohide.diff) * [tabbed-0.5-autohide.diff](tabbed-0.5-autohide.diff) * [tabbed-autohide-20170824-6dc3978.diff](tabbed-autohide-20170824-6dc3978.diff) +* [tabbed-autohide-20180716.diff](tabbed-autohide-20180716.diff) Author ------ @@ -16,3 +17,4 @@ Author * 0.5 Maximilian Dietrich - <dxm_AT_lavabit.com> * 20170708 Alexis Ben Miloud--Josselin - <alexis.bmj@protonmail.com> * 20170824 Audun Sutterud - <audunsu_AT_protonmail.com> +* 20180716 Filip Ivetić - <filip.ivetic_AT_gmail.com> diff --git a/tools.suckless.org/tabbed/patches/tabbed-autohide-20180716.diff b/tools.suckless.org/tabbed/patches/tabbed-autohide-20180716.diff @@ -0,0 +1,50 @@ +diff --git a/tabbed.c b/tabbed.c +index ff3ada0..c41db0c 100644 +--- a/tabbed.c ++++ b/tabbed.c +@@ -152,7 +152,7 @@ static void (*handler[LASTEvent]) (const XEvent *) = { + [MapRequest] = maprequest, + [PropertyNotify] = propertynotify, + }; +-static int bh, wx, wy, ww, wh; ++static int bh, wx, wy, ww, wh, vbh; + static unsigned int numlockmask = 0; + static Bool running = True, nextfocus, doinitspawn = True, + fillagain = False, closelastclient = False; +@@ -307,6 +307,6 @@ void + drawbar(void) { + unsigned long *col; +- int c, fc, width, n = 0; ++ int c, fc, width, n = 0, nbh, i; + char *name = NULL; + + if (nclients == 0) { +@@ -314,10 +314,19 @@ drawbar(void) + dc.w = ww; + XFetchName(dpy, win, &name); + drawtext(name ? name : "", dc.norm); +- XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, bh, 0, 0); ++ XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, vbh, 0, 0); + XSync(dpy, False); + + return; + } + ++ nbh = nclients > 1 ? vbh : 0; ++ if (bh != nbh) { ++ bh = nbh; ++ for (i = 0; i < nclients; i++) ++ XMoveResizeWindow(dpy, clients[i]->win, 0, bh, ww, wh - bh); ++ } ++ if (bh == 0) ++ return; ++ + width = ww; +@@ -920,6 +929,6 @@ setup(void) + screen = DefaultScreen(dpy); + root = RootWindow(dpy, screen); + initfont(font); +- bh = dc.h = dc.font.height + 2; ++ vbh = dc.h = dc.font.height + 2; + + /* init atoms */