diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-02-09 16:47:34 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-02-09 16:47:34 +0900 |
| commit | 7b4b09db1548e6bb6bc60ca64968b24dc2996967 (patch) | |
| tree | 5052e88384bcfc2da3b207de1ac4cdcb7a8a2245 /tabbed/patches/tabbed-autohide-20201222-dabf6a2.diff | |
| parent | 28729f1f7e4cdef4534d969733b9178cd689418e (diff) | |
created tabbed/
Diffstat (limited to 'tabbed/patches/tabbed-autohide-20201222-dabf6a2.diff')
| -rw-r--r-- | tabbed/patches/tabbed-autohide-20201222-dabf6a2.diff | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tabbed/patches/tabbed-autohide-20201222-dabf6a2.diff b/tabbed/patches/tabbed-autohide-20201222-dabf6a2.diff new file mode 100644 index 0000000..d9f71ba --- /dev/null +++ b/tabbed/patches/tabbed-autohide-20201222-dabf6a2.diff @@ -0,0 +1,54 @@ +diff --git a/tabbed.c b/tabbed.c +index eafe28a..b0b9662 100644 +--- a/tabbed.c ++++ b/tabbed.c +@@ -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, +@@ -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) { +@@ -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) +@@ -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); |
