aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Prompt.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Prompt.hs')
-rw-r--r--XMonad/Prompt.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs
index 17a628d..74b7730 100644
--- a/XMonad/Prompt.hs
+++ b/XMonad/Prompt.hs
@@ -266,9 +266,7 @@ getInput = gets command
-- module.
mkXPromptWithReturn :: XPrompt p => p -> XPConfig -> ComplFunction -> (String -> X a) -> X (Maybe a)
mkXPromptWithReturn t conf compl action = do
- c <- ask
- let d = display c
- rw = theRoot c
+ XConf { display = d, theRoot = rw } <- ask
s <- gets $ screenRect . W.screenDetail . W.current . windowset
hist <- io readHistory
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 = do
- st <- get
- let (d,w) = (dpy &&& win) st
+ (d,w) <- gets (dpy &&& win)
status <- io $ grabKeyboard d w True grabModeAsync grabModeAsync currentTime
when (status == grabSuccess) $ do
updateWindows