From 49d099aba3fae63101ec4e017e68bae5c8d66771 Mon Sep 17 00:00:00 2001 From: Devin Mullins Date: Sun, 11 Nov 2007 01:26:17 +0100 Subject: wrap user code in userCode, go figure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (thanks à shachaf for that suggestion) darcs-hash:20071111002617-78224-7920bc75560383513979d9e550025eb6a19654fb.gz --- XMonad/Hooks/UrgencyHook.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'XMonad') diff --git a/XMonad/Hooks/UrgencyHook.hs b/XMonad/Hooks/UrgencyHook.hs index 4956079..84a7628 100644 --- a/XMonad/Hooks/UrgencyHook.hs +++ b/XMonad/Hooks/UrgencyHook.hs @@ -98,7 +98,7 @@ instance UrgencyHook h Window => LayoutModifier (WithUrgencyHook h) Window where when (t == propertyNotify && a == wM_HINTS) $ withDisplay $ \dpy -> do wmh@WMHints { wmh_flags = flags } <- io $ getWMHints dpy w when (testBit flags urgencyHintBit) $ do - urgencyHook theHook w + userCode $ urgencyHook theHook w -- Clear the urgency bit in the WMHints flags field. According to the -- Xlib manual, the *client* is supposed to clear this flag when the urgency -- has been resolved, but, Xchat2, for example, sets the WMHints several @@ -107,8 +107,7 @@ instance UrgencyHook h Window => LayoutModifier (WithUrgencyHook h) Window where io $ setWMHints dpy w wmh { wmh_flags = clearBit flags urgencyHintBit } adjustUrgents (\ws -> if elem w ws then ws else w : ws) -- Call logHook after IORef has been modified. - theLogHook <- asks (logHook . config) - theLogHook + userCode =<< asks (logHook . config) -- Doing the setWMHints triggers another propertyNotify with the bit -- cleared, so we ignore that message. This has the potentially wrong -- effect of ignoring *all* urgency-clearing messages, some of which might -- cgit v1.2.3