mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-13 19:15:44 -07:00
restore the main loop
The ghc versions affected by the join point bug are long obsolete and should not be being used by anyone. This partially reverts #404.
This commit is contained in:
10
CHANGES.md
10
CHANGES.md
@@ -8,6 +8,16 @@
|
|||||||
|
|
||||||
### Bug Fixes
|
### 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)
|
## 0.18.0 (February 3, 2024)
|
||||||
|
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
|
@@ -26,7 +26,7 @@ import qualified Data.Map as M
|
|||||||
import qualified Data.Set as S
|
import qualified Data.Set as S
|
||||||
import Control.Monad.Reader
|
import Control.Monad.Reader
|
||||||
import Control.Monad.State
|
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.Maybe (fromMaybe, isJust)
|
||||||
import Data.Monoid (getAll)
|
import Data.Monoid (getAll)
|
||||||
|
|
||||||
@@ -248,11 +248,10 @@ launch initxmc drs = do
|
|||||||
userCode $ startupHook initxmc
|
userCode $ startupHook initxmc
|
||||||
|
|
||||||
rrData <- io $ xrrQueryExtension dpy
|
rrData <- io $ xrrQueryExtension dpy
|
||||||
|
let rrUpdate = when (isJust rrData) . void . xrrUpdateConfiguration
|
||||||
|
|
||||||
-- main loop, for all you HOF/recursion fans out there.
|
-- main loop, for all you HOF/recursion fans out there.
|
||||||
-- forever $ prehandle =<< io (nextEvent dpy e >> rrUpdate e >> getEvent e)
|
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
|
|
||||||
|
|
||||||
return ()
|
return ()
|
||||||
where
|
where
|
||||||
@@ -263,8 +262,6 @@ launch initxmc drs = do
|
|||||||
in local (\c -> c { mousePosition = mouse, currentEvent = Just e }) (handleWithHook e)
|
in local (\c -> c { mousePosition = mouse, currentEvent = Just e }) (handleWithHook e)
|
||||||
evs = [ keyPress, keyRelease, enterNotify, leaveNotify
|
evs = [ keyPress, keyRelease, enterNotify, leaveNotify
|
||||||
, buttonPress, buttonRelease]
|
, 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
|
-- | Runs handleEventHook from the configuration and runs the default handler
|
||||||
|
Reference in New Issue
Block a user