xmonad-utils 0.1.3.2.1 → 0.1.3.3
raw patch · 2 files changed
+21/−21 lines, 2 files
Files
- src/Hhp.hs +14/−16
- xmonad-utils.cabal +7/−5
src/Hhp.hs view
@@ -14,7 +14,6 @@ module Main where -import Prelude hiding (catch) import Control.Concurrent import Control.Exception import Control.Monad@@ -54,18 +53,17 @@ waitForMotion d w = do mt <- myThreadId t <- forkIO (timer mt)- block $ go t- where- -- interrupt the waiting for motion (and thus hide the pointer)- timer t = do- waitASecond 10- throwTo t (ErrorCall "done")- -- wait for the next motion, and restart the timer (?)- stopAndWait t = do- allocaXEvent $ maskEvent' d pointerMotionMask- -- this seems to just suspend the timer...- throwTo t (ExitSuccess)- waitForMotion d w- -- wait for a timer interrupt to hide the pointer- go t = do- catch (unblock $ stopAndWait t) (const $ hidePointer d w :: ErrorCall -> IO ())+ mask $ \restore -> do --block deprecated in Control.Exception, replaced with mask (Seth A. Yoder, 5/29/2014)+ catch (restore $ stopAndWait t) (const $ hidePointer d w :: SomeException -> IO ())+ where+ -- interrupt the waiting for motion (and thus hide the pointer)+ timer t = do+ waitASecond 10+ throwTo t (ErrorCall "done")+ -- wait for the next motion, and restart the timer (?)+ stopAndWait t = do+ allocaXEvent $ maskEvent' d pointerMotionMask+ -- this seems to just suspend the timer...+ throwTo t (ExitSuccess)+ waitForMotion d w+ -- wait for a timer interrupt to hide the pointer
xmonad-utils.cabal view
@@ -1,5 +1,5 @@ Name: xmonad-utils-Version: 0.1.3.2.1+Version: 0.1.3.3 License: BSD3 License-file: LICENSE Author: Andrea Rossato@@ -11,16 +11,18 @@ Description: A small collection of X utilities useful when running XMonad. It includes: .- * hxsel, which returns the text currently in the X selection;+ * hxsel: which returns the text currently in the X selection; .- * hslock, a simple X screen lock;+ * hxput: sets the value of the X paste buffer; .+ * hslock: a simple X screen lock;+ . * hmanage: an utility to toggle the override-redirect property of any window; .- * and hhp, a simple utility to hide the pointer, similar+ * and hhp: a simple utility to hide the pointer, similar to unclutter.-Homepage: http://www.haskell.org/haskellwiki/Xmonad-utils+Homepage: https://github.com/LeifW/xmonad-utils Build-type: Simple Cabal-version: >=1.6