packages feed

wild-bind-x11 0.2.0.10 → 0.2.0.11

raw patch · 3 files changed

+11/−1 lines, 3 files

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Revision history for wild-bind-x11 +## 0.2.0.11  -- 2020-12-30++* Call [XInitThreads](https://linux.die.net/man/3/xinitthreads) at the start of `withX11Front'`.+  It seemd no problem without this function, but the manual says you need it...+ ## 0.2.0.10  -- 2020-06-21  * Confirm test with `base-4.14.0.0`
src/WildBind/X11/Internal/FrontEnd.hs view
@@ -115,6 +115,7 @@               -> IO a withX11Front' func_name = if rtsSupportsBoundThreads then impl else error_impl where   impl = runContT $ do+    liftIO $ doInitThreads     disp <- ContT $ bracket openMyDisplay Xlib.closeDisplay     keymask_map <- liftIO $ getKeyMaskMap disp     notif_disp <- ContT $ bracket openMyDisplay Xlib.closeDisplay@@ -127,6 +128,10 @@     liftIO $ Ndeb.notify debouncer     return $ X11Front disp debouncer awin_ref pending_events keymask_map grab_man   error_impl _ = throwIO $ userError ("You need to build with -threaded option when you use " ++ func_name ++ " function.")+  doInitThreads = do+    ret <- Xlib.initThreads+    when (ret == 0) $ do+      throwIO $ userError ("Failure in XInitThreads.")   tellElem :: Monad m => a -> WriterT [a] m ()
wild-bind-x11.cabal view
@@ -1,5 +1,5 @@ name:                   wild-bind-x11-version:                0.2.0.10+version:                0.2.0.11 author:                 Toshio Ito <debug.ito@gmail.com> maintainer:             Toshio Ito <debug.ito@gmail.com> license:                BSD3