summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2024-04-23 04:39:46 +0200
committertv <tv@krebsco.de>2024-04-23 04:39:46 +0200
commit5bced47c7301c17d489c58eb1875b90424bb7427 (patch)
tree450f424afa46e55977537b2dbf39284cabfe6a32
parentb12c1419cacec5871554cc26b4c7b36c41110024 (diff)
getWorkspaces: admit _NET_WM_STATE
-rw-r--r--src/pager.hs9
1 files changed, 8 insertions, 1 deletions
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 =