From: Luis Henriques Subject: cwm: still annoying me, hiding windows To: tech@openbsd.org Date: Sat, 11 May 2024 18:52:52 +0100 Hi! I'm revisiting something that still bothers me with cwm after I first reported (and tried to fix it) here: https://marc.info/?l=openbsd-tech&m=166734255003698&w=2 There are probably easier ways to reproduce bug, but here's what works for me. In Emacs simply set an appointment for time in the future: (appt-add "18:30" "my appt") Then, move to a different group and wait for the timer to trigger. When that happens, the Emacs window is gone. I found in [1] the following suggestion regarding _NET_WM_STATE_HIDDEN handling: Implementation note: if an Application asks to toggle _NET_WM_STATE_HIDDEN the Window Manager should probably just ignore the request, since _NET_WM_STATE_HIDDEN is a function of some other aspect of the window such as minimization, rather than an independent state. So... would the patch below be OK? Basically, the issue is the fact that a window that is *not* visible in the group I'm currently using asks cwm to remove the CLIENT_HIDDEN flag. I.e. a _NET_WM_STATE_HIDDEN event with an _NET_WM_STATE_REMOVE Atom. And cwm will simply toggle that flag, which means that it will *set* it -- and when I move to the group that window is, I don't see it any more. [1] https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html Cheers, -- Luís diff --git a/app/cwm/xutil.c b/app/cwm/xutil.c index 8d92b50702eb..ec80dfc485a1 100644 --- a/app/cwm/xutil.c +++ b/app/cwm/xutil.c @@ -449,9 +449,6 @@ xu_ewmh_handle_net_wm_state_msg(struct client_ctx *cc, int action, { _NET_WM_STATE_MAXIMIZED_HORZ, CLIENT_HMAXIMIZED, client_toggle_hmaximize }, - { _NET_WM_STATE_HIDDEN, - CLIENT_HIDDEN, - client_toggle_hidden }, { _NET_WM_STATE_FULLSCREEN, CLIENT_FULLSCREEN, client_toggle_fullscreen },