[wiki] [sites] [tabbed] Make the autohide patch work with the '-p' option || Audun Sutterud

From: <git_AT_suckless.org>
Date: Thu, 17 Aug 2017 13:13:01 +0200

commit e854d3aa85fb00e7c031484c83c05ffa5e22b8fb
Author: Audun Sutterud <audunsu_AT_protonmail.com>
Date: Thu Aug 17 13:08:50 2017 +0200

    [tabbed] Make the autohide patch work with the '-p' option
    
    The previous patch for commit 6dc3978 falsely assumes that new clients
    are inserted at the beginning of the client list. This is not necessarily
    true when the '-p' option is used to set the position of new clients.

diff --git a/tools.suckless.org/tabbed/patches/autohide.md b/tools.suckless.org/tabbed/patches/autohide.md
index 34200615..43c5b116 100644
--- a/tools.suckless.org/tabbed/patches/autohide.md
+++ b/tools.suckless.org/tabbed/patches/autohide.md
_AT_@ -7,11 +7,11 @@ 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-20170708-6dc3978.diff](tabbed-autohide-20170708-6dc3978.diff)
+* [tabbed-autohide-20170817-6dc3978.diff](tabbed-autohide-20170817-6dc3978.diff)
 
 Author
 ------
 * original author Carlos Pita - <carlosjosepita_AT_gmail.com>
 * 0.4.1 Maximilian Dietrich - <dxm_AT_lavabit.com>
 * 0.5 Maximilian Dietrich - <dxm_AT_lavabit.com>
-* 20170708 Alexis Ben Miloud--Josselin - <alexis.bmj_AT_protonmail.com>
+* 20170817 Audun Sutterud - <audunsu_AT_protonmail.com>
diff --git a/tools.suckless.org/tabbed/patches/tabbed-autohide-20170708-6dc3978.diff b/tools.suckless.org/tabbed/patches/tabbed-autohide-20170708-6dc3978.diff
deleted file mode 100644
index 5b6f8a1e..00000000
--- a/tools.suckless.org/tabbed/patches/tabbed-autohide-20170708-6dc3978.diff
+++ /dev/null
_AT_@ -1,18 +0,0 @@
-diff --git a/tabbed.c b/tabbed.c
-index ff3ada0..7414797 100644
---- a/tabbed.c
-+++ b/tabbed.c
-_AT_@ -329,6 +329,13 @@ drawbar(void)
- return;
- }
-
-+ if (nclients == 1) {
-+ XMoveResizeWindow(dpy, clients[0]->win, 0, 0, ww, wh - 0);
-+ return;
-+ } else if (nclients == 2) {
-+ XMoveResizeWindow(dpy, clients[1]->win, 0, bh, ww, wh - bh);
-+ }
-+
- width = ww;
- cc = ww / tabwidth;
- if (nclients > cc)
diff --git a/tools.suckless.org/tabbed/patches/tabbed-autohide-20170817-6dc3978.diff b/tools.suckless.org/tabbed/patches/tabbed-autohide-20170817-6dc3978.diff
new file mode 100644
index 00000000..46c1a7b9
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/tabbed-autohide-20170817-6dc3978.diff
_AT_@ -0,0 +1,26 @@
+diff --git a/tabbed.c b/tabbed.c
+index ff3ada0..952c177 100644
+--- a/tabbed.c
++++ b/tabbed.c
+_AT_@ -329,6 +329,11 @@ drawbar(void)
+ return;
+ }
+
++ if (nclients == 1) {
++ XMoveResizeWindow(dpy, clients[0]->win, 0, 0, ww, wh);
++ return;
++ }
++
+ width = ww;
+ cc = ww / tabwidth;
+ if (nclients > cc)
+_AT_@ -698,6 +703,9 @@ manage(Window w)
+ Client *c;
+ XEvent e;
+
++ if (nclients == 1)
++ XMoveResizeWindow(dpy, clients[0]->win, 0, bh, ww, wh - bh);
++
+ XWithdrawWindow(dpy, w, 0);
+ XReparentWindow(dpy, w, win, 0, bh);
+ XSelectInput(dpy, w, PropertyChangeMask |
Received on Thu Aug 17 2017 - 13:13:01 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 17 2017 - 13:24:45 CEST