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
pull/251/head
bakkeby 2 years ago
parent da5e69c4a7
commit 8f93bb8931

@ -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

@ -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);

Loading…
Cancel
Save