I just wanted to say that if you have a practical need for something
like this then there was a proposal a few years back to make EWMH
windows float.
The way it worked was that you could set up client rules matching on
the window type giving you more control over what becomes floating and
what not.
https://lists.suckless.org/hackers/2006/17456.html
On Fri, May 23, 2025 at 2:27 AM Bang Lee <qusicx_AT_gmail.com> wrote:
>
> Semantically or at least heuristically, these windows are meant to be
> floating as well.
> Based on my testing, NetWMStateModal and NetWMWindowTypeDialog seem to
> be overlapping so I guess we can ignore WindowType and check State
> only. Any feedback is appreciated. Thanks!
> ---
> dwm.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/dwm.c b/dwm.c
> index 1443802..369627d 100644
> --- a/dwm.c
> +++ b/dwm.c
> _AT_@ -61,7 +61,8 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
> enum { SchemeNorm, SchemeSel }; /* color schemes */
> enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
> NetWMFullscreen, NetActiveWindow, NetWMWindowType,
> - NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
> + NetWMWindowTypeDialog, NetWMWindowTypeNotification, NetClientList,
> + NetWMStateModal, NetWMStateSticky, NetWMStateSkipTaskbar,
> NetLast }; /* EWMH atoms */
> enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /*
> default atoms */
> enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
> ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
> _AT_@ -1577,7 +1578,11 @@ setup(void)
> netatom[NetWMFullscreen] = XInternAtom(dpy,
> "_NET_WM_STATE_FULLSCREEN", False);
> netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
> netatom[NetWMWindowTypeDialog] = XInternAtom(dpy,
> "_NET_WM_WINDOW_TYPE_DIALOG", False);
> + netatom[NetWMWindowTypeNotification] = XInternAtom(dpy,
> "_NET_WM_WINDOW_TYPE_NOTIFICATION", False);
> netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
> + netatom[NetWMStateModal] = XInternAtom(dpy, "_NET_WM_STATE_MODAL", False);
> + netatom[NetWMStateSticky] = XInternAtom(dpy, "_NET_WM_STATE_STICKY", False);
> + netatom[NetWMStateSkipTaskbar] = XInternAtom(dpy,
> "_NET_WM_STATE_SKIP_TASKBAR", False);
> /* init cursors */
> cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
> cursor[CurResize] = drw_cur_create(drw, XC_sizing);
> _AT_@ -2026,7 +2031,11 @@ updatewindowtype(Client *c)
>
> if (state == netatom[NetWMFullscreen])
> setfullscreen(c, 1);
> - if (wtype == netatom[NetWMWindowTypeDialog])
> + if (wtype == netatom[NetWMWindowTypeDialog]
> + || wtype == netatom[NetWMWindowTypeNotification]
> + || state == netatom[NetWMStateModal]
> + || state == netatom[NetWMStateSticky]
> + || state == netatom[NetWMStateSkipTaskbar])
> c->isfloating = 1;
> }
>
> --
> 2.49.0
>
Received on Fri May 23 2025 - 19:36:54 CEST