aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Prompt.hs
diff options
context:
space:
mode:
authorSpencer Janssen <spencerjanssen@gmail.com>2009-11-03 23:26:21 +0100
committerSpencer Janssen <spencerjanssen@gmail.com>2009-11-03 23:26:21 +0100
commit3428df3d2fb202fc3745804971941d5b27600858 (patch)
tree5cbd529bf4a0dcb1c7e7533448592a6386337b37 /XMonad/Prompt.hs
parent2d1e541bc8e3210049a37aa885a9fccbff940daa (diff)
downloadXMonadContrib-3428df3d2fb202fc3745804971941d5b27600858.tar.gz
XMonadContrib-3428df3d2fb202fc3745804971941d5b27600858.tar.xz
XMonadContrib-3428df3d2fb202fc3745804971941d5b27600858.zip
Update Prompt for numlockMask changes
Ignore-this: 4980e2fdf4c296a266590cc4acf76e1e darcs-hash:20091103222621-25a6b-429b2f1d687a6e10a1c6426e7a04fa3d22212f4c.gz
Diffstat (limited to '')
-rw-r--r--XMonad/Prompt.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs
index 3e02639..a8646e1 100644
--- a/XMonad/Prompt.hs
+++ b/XMonad/Prompt.hs
@@ -64,7 +64,7 @@ module XMonad.Prompt
import Prelude hiding (catch)
import XMonad hiding (config, numlockMask, cleanMask)
-import qualified XMonad as X (numlockMask,config)
+import qualified XMonad as X (numlockMask)
import qualified XMonad.StackSet as W
import XMonad.Util.Font
import XMonad.Util.Types
@@ -219,8 +219,8 @@ amberXPConfig = defaultXPConfig { fgColor = "#ca8f2d", bgColor = "black", fgHLig
type ComplFunction = String -> IO [String]
initState :: XPrompt p => Display -> Window -> Window -> Rectangle -> ComplFunction
- -> GC -> XMonadFont -> p -> [String] -> XPConfig -> XPState
-initState d rw w s compl gc fonts pt h c =
+ -> GC -> XMonadFont -> p -> [String] -> XPConfig -> KeyMask -> XPState
+initState d rw w s compl gc fonts pt h c nm =
XPS { dpy = d
, rootw = rw
, win = w
@@ -239,7 +239,7 @@ initState d rw w s compl gc fonts pt h c =
, config = c
, successful = False
, done = False
- , numlockMask = X.numlockMask defaultConfig
+ , numlockMask = nm
}
-- this would be much easier with functional references
@@ -274,10 +274,9 @@ mkXPromptWithReturn t conf compl action = do
gc <- io $ createGC d w
io $ setGraphicsExposures d gc False
fs <- initXMF (font conf)
- numlock <- asks $ X.numlockMask . X.config
+ numlock <- gets $ X.numlockMask
let hs = fromMaybe [] $ M.lookup (showXPrompt t) hist
- st = (initState d rw w s compl gc fs (XPT t) hs conf)
- { numlockMask = numlock }
+ st = initState d rw w s compl gc fs (XPT t) hs conf numlock
st' <- io $ execStateT runXP st
releaseXMF fs