mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
Update Prompt for numlockMask changes
This commit is contained in:
parent
5c2aa04175
commit
cdae01dfdb
@ -64,7 +64,7 @@ module XMonad.Prompt
|
|||||||
import Prelude hiding (catch)
|
import Prelude hiding (catch)
|
||||||
|
|
||||||
import XMonad hiding (config, numlockMask, cleanMask)
|
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 qualified XMonad.StackSet as W
|
||||||
import XMonad.Util.Font
|
import XMonad.Util.Font
|
||||||
import XMonad.Util.Types
|
import XMonad.Util.Types
|
||||||
@ -219,8 +219,8 @@ amberXPConfig = defaultXPConfig { fgColor = "#ca8f2d", bgColor = "black", fgHLig
|
|||||||
type ComplFunction = String -> IO [String]
|
type ComplFunction = String -> IO [String]
|
||||||
|
|
||||||
initState :: XPrompt p => Display -> Window -> Window -> Rectangle -> ComplFunction
|
initState :: XPrompt p => Display -> Window -> Window -> Rectangle -> ComplFunction
|
||||||
-> GC -> XMonadFont -> p -> [String] -> XPConfig -> XPState
|
-> GC -> XMonadFont -> p -> [String] -> XPConfig -> KeyMask -> XPState
|
||||||
initState d rw w s compl gc fonts pt h c =
|
initState d rw w s compl gc fonts pt h c nm =
|
||||||
XPS { dpy = d
|
XPS { dpy = d
|
||||||
, rootw = rw
|
, rootw = rw
|
||||||
, win = w
|
, win = w
|
||||||
@ -239,7 +239,7 @@ initState d rw w s compl gc fonts pt h c =
|
|||||||
, config = c
|
, config = c
|
||||||
, successful = False
|
, successful = False
|
||||||
, done = False
|
, done = False
|
||||||
, numlockMask = X.numlockMask defaultConfig
|
, numlockMask = nm
|
||||||
}
|
}
|
||||||
|
|
||||||
-- this would be much easier with functional references
|
-- this would be much easier with functional references
|
||||||
@ -274,10 +274,9 @@ mkXPromptWithReturn t conf compl action = do
|
|||||||
gc <- io $ createGC d w
|
gc <- io $ createGC d w
|
||||||
io $ setGraphicsExposures d gc False
|
io $ setGraphicsExposures d gc False
|
||||||
fs <- initXMF (font conf)
|
fs <- initXMF (font conf)
|
||||||
numlock <- asks $ X.numlockMask . X.config
|
numlock <- gets $ X.numlockMask
|
||||||
let hs = fromMaybe [] $ M.lookup (showXPrompt t) hist
|
let hs = fromMaybe [] $ M.lookup (showXPrompt t) hist
|
||||||
st = (initState d rw w s compl gc fs (XPT t) hs conf)
|
st = initState d rw w s compl gc fs (XPT t) hs conf numlock
|
||||||
{ numlockMask = numlock }
|
|
||||||
st' <- io $ execStateT runXP st
|
st' <- io $ execStateT runXP st
|
||||||
|
|
||||||
releaseXMF fs
|
releaseXMF fs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user