diff options
| author | mhsn <mail@mhsn.net> | 2025-12-30 11:26:20 +0000 |
|---|---|---|
| committer | mhsn <mail@mhsn.net> | 2025-12-30 11:27:31 +0000 |
| commit | e4ed5c0d49807aa96425f1f4203ff040fb4d1647 (patch) | |
| tree | 09101fbcee6323ffe00f7840ba482fa388525300 | |
| parent | 4cd5e958b4177f069d098b8785e7ab677037b534 (diff) | |
| download | adelie-e4ed5c0d49807aa96425f1f4203ff040fb4d1647.tar.gz adelie-e4ed5c0d49807aa96425f1f4203ff040fb4d1647.zip | |
dwm add noborder patch
| -rw-r--r-- | x11-wm/dwm/dwm-9999.ebuild | 1 | ||||
| -rw-r--r-- | x11-wm/dwm/files/08_noborderselflickerfix.diff | 53 |
2 files changed, 54 insertions, 0 deletions
diff --git a/x11-wm/dwm/dwm-9999.ebuild b/x11-wm/dwm/dwm-9999.ebuild index 0e4b8bd..f776429 100644 --- a/x11-wm/dwm/dwm-9999.ebuild +++ b/x11-wm/dwm/dwm-9999.ebuild @@ -18,6 +18,7 @@ PATCHES=( ${FILESDIR}/05_scratchpad.diff ${FILESDIR}/06_swallow.diff ${FILESDIR}/07_bulkkill.diff + ${FILESDIR}/08_noborderselflickerfix.diff ${FILESDIR}/50_larger-font.diff ${FILESDIR}/51_colors.diff ${FILESDIR}/52_keys.diff diff --git a/x11-wm/dwm/files/08_noborderselflickerfix.diff b/x11-wm/dwm/files/08_noborderselflickerfix.diff new file mode 100644 index 0000000..5a3008a --- /dev/null +++ b/x11-wm/dwm/files/08_noborderselflickerfix.diff @@ -0,0 +1,53 @@ +diff --git i/dwm.c w/dwm.c +index 4150456..4c60342 100644 +--- i/dwm.c ++++ w/dwm.c +@@ -221,6 +221,7 @@ static void setmfact(const Arg *arg); + static void setup(void); + static void seturgent(Client *c, int urg); + static void showhide(Client *c); ++static int solitary(Client *c); + static void spawn(const Arg *arg); + static void tag(const Arg *arg); + static void tagmon(const Arg *arg); +@@ -889,7 +890,11 @@ focus(Client *c) + detachstack(c); + attachstack(c); + grabbuttons(c, 1); +- XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel); ++ /* Avoid flickering when another client appears and the border ++ * is restored */ ++ if (!solitary(c)) { ++ XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel); ++ } + setfocus(c); + } else { + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); +@@ -1500,6 +1505,11 @@ resizeclient(Client *c, int x, int y, int w, int h) + c->oldw = c->w; c->w = wc.width = w; + c->oldh = c->h; c->h = wc.height = h; + wc.border_width = c->bw; ++ if (solitary(c)) { ++ c->w = wc.width += c->bw * 2; ++ c->h = wc.height += c->bw * 2; ++ wc.border_width = 0; ++ } + XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); + configure(c); + XSync(dpy, False); +@@ -1852,6 +1862,15 @@ showhide(Client *c) + } + } + ++int ++solitary(Client *c) ++{ ++ return ((nexttiled(c->mon->clients) == c && !nexttiled(c->next)) ++ || &monocle == c->mon->lt[c->mon->sellt]->arrange) ++ && !c->isfullscreen && !c->isfloating ++ && NULL != c->mon->lt[c->mon->sellt]->arrange; ++} ++ + void + spawn(const Arg *arg) + { |
