From 8f93bb8931207810107ed36672f17312e3c5157c Mon Sep 17 00:00:00 2001 From: bakkeby Date: Mon, 14 Mar 2022 09:39:19 +0100 Subject: [PATCH] manage: For isfloating/oldstate check/set, ensure trans client actually exists In certain instances trans may be set to a window that doesn't actually map to a client via wintoclient; in this case it doesn't make sense to set isfloating/oldstate since trans is essentially invalid in that case / correlates to the above condition check where trans is set / XGetTransientForHint is called. Ref. https://git.suckless.org/dwm/commit/bece862a0fc4fc18ef9065b18cd28e2032d0d975.html --- README.md | 2 +- dwm.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a42572e..14bf980 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -This dwm 6.3 (d39e2f3, 2022-01-07) side project has a different take on dwm patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more. Due to the complexity of some of the patches dwm-flexipatch has diverged from mainstream dwm by making some core patches non-optional for maintenance reasons. For the classic dwm-flexipatch build refer to branch [dwm-flexipatch-1.0](https://github.com/bakkeby/dwm-flexipatch/tree/dwm-flexipatch-1.0). +This dwm 6.3 (bece862, 2022-03-13) side project has a different take on dwm patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more. Due to the complexity of some of the patches dwm-flexipatch has diverged from mainstream dwm by making some core patches non-optional for maintenance reasons. For the classic dwm-flexipatch build refer to branch [dwm-flexipatch-1.0](https://github.com/bakkeby/dwm-flexipatch/tree/dwm-flexipatch-1.0). For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/dwm-flexipatch/blob/master/patches.def.h): ```c diff --git a/dwm.c b/dwm.c index ea20c20..627afa9 100644 --- a/dwm.c +++ b/dwm.c @@ -1773,7 +1773,9 @@ drawbar(Monitor *m) { Bar *bar; + #if !BAR_FLEXWINTITLE_PATCH if (m->showbar) + #endif // BAR_FLEXWINTITLE_PATCH for (bar = m->bar; bar; bar = bar->next) drawbarwin(bar); } @@ -2437,7 +2439,7 @@ manage(Window w, XWindowAttributes *wa) #endif // MAXIMIZE_PATCH / EXRESIZE_PATCH if (!c->isfloating) - c->isfloating = c->oldstate = trans != None || c->isfixed; + c->isfloating = c->oldstate = t || c->isfixed; if (c->isfloating) { XRaiseWindow(dpy, c->win); XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColFloat].pixel);