sites

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

commit e854d3aa85fb00e7c031484c83c05ffa5e22b8fb
parent 63110a55873fb01f95f19487570151834f4ac33c
Author: Audun Sutterud <audunsu@protonmail.com>
Date:   Thu, 17 Aug 2017 13:08:50 +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.

Diffstat:
Mtools.suckless.org/tabbed/patches/autohide.md | 4++--
Dtools.suckless.org/tabbed/patches/tabbed-autohide-20170708-6dc3978.diff | 18------------------
Atools.suckless.org/tabbed/patches/tabbed-autohide-20170817-6dc3978.diff | 26++++++++++++++++++++++++++
3 files changed, 28 insertions(+), 20 deletions(-)

diff --git a/tools.suckless.org/tabbed/patches/autohide.md b/tools.suckless.org/tabbed/patches/autohide.md @@ -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@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 @@ -1,18 +0,0 @@ -diff --git a/tabbed.c b/tabbed.c -index ff3ada0..7414797 100644 ---- a/tabbed.c -+++ b/tabbed.c -@@ -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 @@ -0,0 +1,26 @@ +diff --git a/tabbed.c b/tabbed.c +index ff3ada0..952c177 100644 +--- a/tabbed.c ++++ b/tabbed.c +@@ -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) +@@ -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 |