REF write message to future self warning of the dangers of flushing

This commit is contained in:
Nathan Dwarshuis 2021-06-19 16:20:14 -04:00
parent 49966a962d
commit aff60a9409
1 changed files with 6 additions and 1 deletions

View File

@ -75,6 +75,11 @@ main = do
, childHandles = [h] , childHandles = [h]
} }
(ekbs, missing) <- fmap filterExternal $ evalExternal $ externalBindings ts (ekbs, missing) <- fmap filterExternal $ evalExternal $ externalBindings ts
-- TODO this seems really dumb but I can't print outside the launch function;
-- this seems like a buffering problem since I can print something here and
-- then print from the launch function (eg in the X monad) and both messages
-- will print. However, trying to flush the print output from here makes
-- xmonad bootloop
let missingErrs = warnMissing <$> missing let missingErrs = warnMissing <$> missing
launch launch
$ ewmh $ ewmh
@ -117,7 +122,7 @@ runCleanup ts = io $ do
-- TODO add _NET_DESKTOP_VIEWPORTS to _NET_SUPPORTED? -- TODO add _NET_DESKTOP_VIEWPORTS to _NET_SUPPORTED?
myStartupHook :: [String] -> X () myStartupHook :: [String] -> X ()
myStartupHook msgs = setDefaultCursor xC_left_ptr myStartupHook msgs = setDefaultCursor xC_left_ptr
<+> (io $ mapM_ print msgs) <+> io (mapM_ print msgs)
<+> docksStartupHook <+> docksStartupHook
<+> startupHook def <+> startupHook def