Adding _IS_FLOATING xproperty patch for floating windows ref. #50

pull/74/head
bakkeby 4 years ago
parent 8536aa52c4
commit 8726ae0aa9

@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
2020-09-28 - Added the \_IS\_FLOATING patch (embedded in the EWMHTAGS patch)
2020-09-18 - Added the nomodbuttons patch allowing for toggleable mouse button bindings that have no modifiers
2020-09-10 - Added the anybar patch (with experimental support for dwm bar(s) + anybar)
@ -369,6 +371,11 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- implements inter-process communication through a UNIX socket for dwm
- allows for the window manager to be queried for information, e.g. listen for events such as tag or layout changes, as well as send commands to control the window manager via other programs
- [\_IS\_FLOATING](https://github.com/bakkeby/dwm-flexipatch/issues/50)
- adds the \_IS\_FLOATING xproperty for floating windows
- this can allow for a compositor to handle floating windows differently to tiled windows, e.g. only show shadows on floating windows
- this patch is enabled via the ewmhtags patch
- [ispermanent](https://dwm.suckless.org/patches/ispermanent/)
- adds rule option for clients to avoid accidental termination by killclient for sticky windows

@ -2253,6 +2253,10 @@ manage(Window w, XWindowAttributes *wa)
arrange(c->mon);
#endif // SWALLOW_PATCH
focus(NULL);
#if BAR_EWMHTAGS_PATCH
setfloatinghint(c);
#endif // BAR_EWMHTAGS_PATCH
}
void
@ -3663,6 +3667,10 @@ togglefloating(const Arg *arg)
#endif // SAVEFLOATS_PATCH / EXRESIZE_PATCH
}
arrange(c->mon);
#if BAR_EWMHTAGS_PATCH
setfloatinghint(c);
#endif // BAR_EWMHTAGS_PATCH
}
void

@ -17,6 +17,14 @@ setdesktopnames(void)
XSetTextProperty(dpy, root, &text, netatom[NetDesktopNames]);
}
void
setfloatinghint(Client *c)
{
Atom target = XInternAtom(dpy, "_IS_FLOATING", 0);
unsigned int floating[1] = {c->isfloating};
XChangeProperty(dpy, c->win, target, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)floating, 1);
}
void
setnumdesktops(void)
{

@ -1,5 +1,6 @@
static void setcurrentdesktop(void);
static void setdesktopnames(void);
static void setfloatinghint(Client *c);
static void setnumdesktops(void);
static void setviewport(void);
static void updatecurrentdesktop(void);

@ -238,6 +238,15 @@
/* Adds EWMH support for _NET_NUMBER_OF_DESKTOPS, _NET_CURRENT_DESKTOP, _NET_DESKTOP_NAMES
* and _NET_DESKTOP_VIEWPORT, which allows for compatibility with other bars and programs
* that request workspace information. For example polybar's xworkspaces module.
*
* This patch also includes support for adding the _IS_FLOATING property for floating windows
* allowing for compositors to treat floating windows differently to tiled windows.
*
* E.g. this setting makes picom only render shadows for floating windows:
*
* shadow-exclude = [ "! _IS_FLOATING@:32c = 1" ];
*
* https://github.com/bakkeby/dwm-flexipatch/issues/50 (_IS_FLOATING patch)
* https://dwm.suckless.org/patches/ewmhtags/
*/
#define BAR_EWMHTAGS_PATCH 0

Loading…
Cancel
Save