diff --git a/CHANGES.md b/CHANGES.md index dc8f359..187de24 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,16 @@ ### Bug Fixes +### Other + +PR #404 (see last change in 0.17.1) has been reverted, because the affected +compilers are (hopefully) no longer being used. + +All 9.0 releases of GHC, plus 9.2.1 and 9.2.2 have the join point bug. +Note that 9.0.x is known to also have GC issues and is officially deprecated, +and the only 9.2 release that should be used is 9.2.8. Additionally, GHC HQ +doesn't support releases before 9.6.6. + ## 0.18.0 (February 3, 2024) ### Breaking Changes diff --git a/src/XMonad/Main.hs b/src/XMonad/Main.hs index c6913bb..50aa761 100644 --- a/src/XMonad/Main.hs +++ b/src/XMonad/Main.hs @@ -26,7 +26,7 @@ import qualified Data.Map as M import qualified Data.Set as S import Control.Monad.Reader import Control.Monad.State -import Control.Monad (filterM, guard, unless, void, when) +import Control.Monad (filterM, guard, unless, void, when, forever) import Data.Maybe (fromMaybe, isJust) import Data.Monoid (getAll) @@ -248,11 +248,10 @@ launch initxmc drs = do userCode $ startupHook initxmc rrData <- io $ xrrQueryExtension dpy + let rrUpdate = when (isJust rrData) . void . xrrUpdateConfiguration -- main loop, for all you HOF/recursion fans out there. - -- forever $ prehandle =<< io (nextEvent dpy e >> rrUpdate e >> getEvent e) - -- sadly, 9.2.{1,2,3} join points mishandle the above and trash the heap (see #389) - mainLoop dpy e rrData + forever $ prehandle =<< io (nextEvent dpy e >> rrUpdate e >> getEvent e) return () where @@ -263,8 +262,6 @@ launch initxmc drs = do in local (\c -> c { mousePosition = mouse, currentEvent = Just e }) (handleWithHook e) evs = [ keyPress, keyRelease, enterNotify, leaveNotify , buttonPress, buttonRelease] - rrUpdate e r = when (isJust r) (void (xrrUpdateConfiguration e)) - mainLoop d e r = io (nextEvent d e >> rrUpdate e r >> getEvent e) >>= prehandle >> mainLoop d e r -- | Runs handleEventHook from the configuration and runs the default handler