[wiki] [sites] tabbed autohide patch update || Tobias Farrenkopf

From: <git_AT_suckless.org>
Date: Tue, 22 Dec 2020 07:07:38 +0100

commit 39d4f0e73e790d05eead77b475e67aa478399bf2
Author: Tobias Farrenkopf <tf_AT_emptyset.de>
Date: Tue Dec 22 07:04:32 2020 +0100

    tabbed autohide patch update

diff --git a/tools.suckless.org/tabbed/patches/autohide/index.md b/tools.suckless.org/tabbed/patches/autohide/index.md
index 7e8d02d2..68cb956b 100644
--- a/tools.suckless.org/tabbed/patches/autohide/index.md
+++ b/tools.suckless.org/tabbed/patches/autohide/index.md
_AT_@ -8,6 +8,7 @@ Download
 * [tabbed-0.5-autohide.diff](tabbed-0.5-autohide.diff)
 * [tabbed-autohide-0.6.diff](tabbed-autohide-0.6.diff)
 * [tabbed-autohide-20170824-6dc3978.diff](tabbed-autohide-20170824-6dc3978.diff)
+* [tabbed-autohide-20201222-dabf6a2.diff](tabbed-autohide-20201222-dabf6a2.diff)
 
 Author
 ------
_AT_@ -16,4 +17,5 @@ Author
 * 0.5 Maximilian Dietrich - <dxm_AT_lavabit.com>
 * 20170708 Alexis Ben Miloud--Josselin; panpo; alexisbmj+code at protonmail dot com.
 * 20170824 Audun Sutterud - <audunsu_AT_protonmail.com>
+* 20201222 Tobias Farrenkopf - <tobias.farrenkopf_AT_gmail.com>
 * 0.6 Filip Ivetić - <filip.ivetic_AT_gmail.com>
diff --git a/tools.suckless.org/tabbed/patches/autohide/tabbed-autohide-20201222-dabf6a2.diff b/tools.suckless.org/tabbed/patches/autohide/tabbed-autohide-20201222-dabf6a2.diff
new file mode 100644
index 00000000..d9f71bae
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/autohide/tabbed-autohide-20201222-dabf6a2.diff
_AT_@ -0,0 +1,54 @@
+diff --git a/tabbed.c b/tabbed.c
+index eafe28a..b0b9662 100644
+--- a/tabbed.c
++++ b/tabbed.c
+_AT_@ -152,7 +152,7 @@ static void (*handler[LASTEvent]) (const XEvent *) = {
+ [MapRequest] = maprequest,
+ [PropertyNotify] = propertynotify,
+ };
+-static int bh, obh, wx, wy, ww, wh;
++static int bh, obh, wx, wy, ww, wh, vbh;
+ static unsigned int numlockmask;
+ static Bool running = True, nextfocus, doinitspawn = True,
+ fillagain = False, closelastclient = False,
+_AT_@ -324,7 +324,7 @@ void
+ drawbar(void)
+ {
+ XftColor *col;
+- int c, cc, fc, width;
++ int c, cc, fc, width, nbh, i;
+ char *name = NULL;
+
+ if (nclients == 0) {
+_AT_@ -332,12 +332,21 @@ 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;
+ cc = ww / tabwidth;
+ if (nclients > cc)
+_AT_@ -984,7 +993,7 @@ 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 */
+ wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
Received on Tue Dec 22 2020 - 07:07:38 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 22 2020 - 07:12:45 CET