[wiki] [sites] tabbed autohide patch update || Filip Ivetić

From: <git_AT_suckless.org>
Date: Mon, 16 Jul 2018 20:05:22 +0200

commit 5e65dd8e79538229c830ba96008f636a98e35555
Author: Filip Ivetić <filip.ivetic_AT_gmail.com>
Date: Mon Jul 16 20:04:14 2018 +0200

    tabbed autohide patch update

diff --git a/tools.suckless.org/tabbed/patches/autohide.md b/tools.suckless.org/tabbed/patches/autohide.md
index e9168d51..5dfc2f66 100644
--- a/tools.suckless.org/tabbed/patches/autohide.md
+++ b/tools.suckless.org/tabbed/patches/autohide.md
_AT_@ -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
 ------
_AT_@ -16,3 +17,4 @@ Author
 * 0.5 Maximilian Dietrich - <dxm_AT_lavabit.com>
 * 20170708 Alexis Ben Miloud--Josselin - <alexis.bmj_AT_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
new file mode 100644
index 00000000..fd641b49
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/tabbed-autohide-20180716.diff
_AT_@ -0,0 +1,50 @@
+diff --git a/tabbed.c b/tabbed.c
+index ff3ada0..c41db0c 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, 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;
+_AT_@ -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) {
+_AT_@ -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;
+_AT_@ -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 */
Received on Mon Jul 16 2018 - 20:05:22 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 16 2018 - 20:12:27 CEST