mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
replaced "let Just x = ..." in view with "case ... of ..."
This commit is contained in:
parent
bb43b2ad6f
commit
48974f51e6
11
Main.hs
11
Main.hs
@ -336,10 +336,13 @@ view o = do
|
|||||||
if M.member n ws2sc
|
if M.member n ws2sc
|
||||||
then windows $ W.view n
|
then windows $ W.view n
|
||||||
else do
|
else do
|
||||||
-- This assumes that the current workspace is visible.
|
sc <- case M.lookup m ws2sc of
|
||||||
-- Is that always going to be true?
|
Nothing -> do
|
||||||
let Just curscreen = M.lookup m ws2sc
|
trace "Current workspace isn't visible! This should never happen!"
|
||||||
modify $ \s -> s { wsOnScreen = M.insert n curscreen (M.delete m ws2sc) }
|
-- we don't know what screen to use, just use the first one.
|
||||||
|
return 0
|
||||||
|
Just sc -> return sc
|
||||||
|
modify $ \s -> s { wsOnScreen = M.insert n sc (M.filter (/=sc) ws2sc) }
|
||||||
windows $ W.view n
|
windows $ W.view n
|
||||||
mapM_ hide (W.index m ws)
|
mapM_ hide (W.index m ws)
|
||||||
setTopFocus
|
setTopFocus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user