On Thu, May 22, 2025 at 04:57:46PM -0700, Bang Lee 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!
What kind of testing did you do?
Do you have an specific application to test this change with?
Such details are important for these kind of changes.
> ---
> 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
>
--
Kind regards,
Hiltjo
Received on Fri May 23 2025 - 16:57:22 CEST