freebsd-ports/x11-wm/hs-xmonad/files/nopatch-XMonad_Core.hs
Gabor Pali b5f37a01e1 - Add a (default) xmonad workaround for losing hotkeys in certain cases.
For the details, please see the related bug report or issue #576 in the
  xmonad bug tracker [1].

[1] https://code.google.com/p/xmonad/issues/detail?id=576

PR:		181049
Submitted by:	Dominik Ernst <de@dernst.org>
Obtained from:	FreeBSD Haskell
MFH:		2015Q1
2015-02-15 21:46:06 +00:00

21 lines
686 B
Haskell

--- XMonad/Core.hs.orig 2013-01-01 01:31:47 UTC
+++ XMonad/Core.hs
@@ -400,10 +400,13 @@ spawnPID x = xfork $ executeFile "/bin/s
-- | A replacement for 'forkProcess' which resets default signal handlers.
xfork :: MonadIO m => IO () -> m ProcessID
-xfork x = io . forkProcess . finally nullStdin $ do
- uninstallSignalHandlers
- createSession
- x
+xfork x = do
+ pid <- liftIO $ forkProcess $ finally nullStdin $ do
+ forkProcess $ do
+ uninstallSignalHandlers
+ createSession
+ x
+ return pid
where
nullStdin = do
fd <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags