From 5bced47c7301c17d489c58eb1875b90424bb7427 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 23 Apr 2024 04:39:46 +0200 Subject: getWorkspaces: admit _NET_WM_STATE --- src/pager.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pager.hs b/src/pager.hs index dbfc6b0..2af362a 100644 --- a/src/pager.hs +++ b/src/pager.hs @@ -83,7 +83,14 @@ getWorkspaces display screenGeometry focusWindows = do geometry <- getGeometry display w wm_hints <- X11.getWMHints display w - let urgent = testBit (X11.wmh_flags wm_hints) X11.urgencyHintBit + + wm_state <- + maybe [] (map fromIntegral) <$> + X11.getWindowProperty32 display X11._NET_WM_STATE w + + let urgent = + testBit (X11.wmh_flags wm_hints) X11.urgencyHintBit || + elem X11._NET_WM_STATE_DEMANDS_ATTENTION wm_state let window = -- cgit v1.2.3