Use less short names in X.Prompt

This commit is contained in:
Adam Vogt 2009-11-15 02:56:47 +00:00
parent aa6f4882a4
commit b4acd87c7a

View File

@ -266,9 +266,7 @@ getInput = gets command
-- module. -- module.
mkXPromptWithReturn :: XPrompt p => p -> XPConfig -> ComplFunction -> (String -> X a) -> X (Maybe a) mkXPromptWithReturn :: XPrompt p => p -> XPConfig -> ComplFunction -> (String -> X a) -> X (Maybe a)
mkXPromptWithReturn t conf compl action = do mkXPromptWithReturn t conf compl action = do
c <- ask XConf { display = d, theRoot = rw } <- ask
let d = display c
rw = theRoot c
s <- gets $ screenRect . W.screenDetail . W.current . windowset s <- gets $ screenRect . W.screenDetail . W.current . windowset
hist <- io readHistory hist <- io readHistory
w <- io $ createWin d rw conf s w <- io $ createWin d rw conf s
@ -313,8 +311,7 @@ mkXPrompt t conf compl action = mkXPromptWithReturn t conf compl action >> retur
runXP :: XP () runXP :: XP ()
runXP = do runXP = do
st <- get (d,w) <- gets (dpy &&& win)
let (d,w) = (dpy &&& win) st
status <- io $ grabKeyboard d w True grabModeAsync grabModeAsync currentTime status <- io $ grabKeyboard d w True grabModeAsync grabModeAsync currentTime
when (status == grabSuccess) $ do when (status == grabSuccess) $ do
updateWindows updateWindows