mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
fix up funny unicode whitespace in Fullscreen
This commit is contained in:
parent
02a3b820c9
commit
1c50b1aa9a
@ -90,14 +90,14 @@ instance LayoutModifier FullscreenFull Window where
|
||||
|
||||
pureModifier (FullscreenFull frect fulls) rect _ list =
|
||||
(map (flip (,) rect') visfulls ++ rest, Nothing)
|
||||
where visfulls = intersect fulls $ map fst list
|
||||
where visfulls = intersect fulls $ map fst list
|
||||
rest = filter (flip notElem visfulls . fst) list
|
||||
rect' = scaleRationalRect rect frect
|
||||
|
||||
instance LayoutModifier FullscreenFocus Window where
|
||||
pureMess (FullscreenFocus frect fulls) m = case fromMessage m of
|
||||
Just (AddFullscreen win) -> Just $ FullscreenFocus frect $ nub $ win:fulls
|
||||
Just (RemoveFullscreen win) -> Just $ FullscreenFocus frect $ delete win $ fulls
|
||||
Just (AddFullscreen win) -> Just $ FullscreenFocus frect $ nub $ win:fulls
|
||||
Just (RemoveFullscreen win) -> Just $ FullscreenFocus frect $ delete win $ fulls
|
||||
_ -> Nothing
|
||||
|
||||
pureModifier (FullscreenFocus frect fulls) rect (Just (W.Stack {W.focus = f})) list
|
||||
@ -110,13 +110,13 @@ instance LayoutModifier FullscreenFocus Window where
|
||||
instance LayoutModifier FullscreenFloat Window where
|
||||
handleMess (FullscreenFloat frect fulls) m = case fromMessage m of
|
||||
Just (AddFullscreen win) -> do
|
||||
mrect <- (M.lookup win . W.floating) `fmap` gets windowset
|
||||
return $ case mrect of
|
||||
Just rect -> Just $ FullscreenFloat frect $ M.insert win (rect,True) fulls
|
||||
mrect <- (M.lookup win . W.floating) `fmap` gets windowset
|
||||
return $ case mrect of
|
||||
Just rect -> Just $ FullscreenFloat frect $ M.insert win (rect,True) fulls
|
||||
Nothing -> Nothing
|
||||
|
||||
Just (RemoveFullscreen win) ->
|
||||
return $ Just $ FullscreenFloat frect $ M.adjust (second $ const False) win fulls
|
||||
return $ Just $ FullscreenFloat frect $ M.adjust (second $ const False) win fulls
|
||||
|
||||
-- Modify the floating member of the stack set directly; this is the hackish part.
|
||||
Just FullscreenChanged -> do
|
||||
@ -125,7 +125,7 @@ instance LayoutModifier FullscreenFloat Window where
|
||||
flt = W.floating ws
|
||||
flt' = M.intersectionWith doFull fulls flt
|
||||
put state {windowset = ws {W.floating = M.union flt' flt}}
|
||||
return $ Just $ FullscreenFloat frect $ M.filter snd fulls
|
||||
return $ Just $ FullscreenFloat frect $ M.filter snd fulls
|
||||
where doFull (_, True) _ = frect
|
||||
doFull (rect, False) _ = rect
|
||||
|
||||
@ -141,7 +141,7 @@ fullscreenFull = fullscreenFullRect $ W.RationalRect 0 0 1 1
|
||||
-- specified rectangle instead of the entire screen.
|
||||
fullscreenFullRect :: LayoutClass l a =>
|
||||
W.RationalRect -> l a -> ModifiedLayout FullscreenFull l a
|
||||
fullscreenFullRect r = ModifiedLayout $ FullscreenFull r []
|
||||
fullscreenFullRect r = ModifiedLayout $ FullscreenFull r []
|
||||
|
||||
-- | Layout modifier that makes the fullscreened window fill
|
||||
-- the entire screen only if it is currently focused.
|
||||
@ -153,7 +153,7 @@ fullscreenFocus = fullscreenFocusRect $ W.RationalRect 0 0 1 1
|
||||
-- specified rectangle instead of the entire screen.
|
||||
fullscreenFocusRect :: LayoutClass l a =>
|
||||
W.RationalRect -> l a -> ModifiedLayout FullscreenFocus l a
|
||||
fullscreenFocusRect r = ModifiedLayout $ FullscreenFocus r []
|
||||
fullscreenFocusRect r = ModifiedLayout $ FullscreenFocus r []
|
||||
|
||||
-- | Hackish layout modifier that makes floating fullscreened
|
||||
-- windows fill the entire screen.
|
||||
@ -165,7 +165,7 @@ fullscreenFloat = fullscreenFloatRect $ W.RationalRect 0 0 1 1
|
||||
-- specified rectangle instead of the entire screen.
|
||||
fullscreenFloatRect :: LayoutClass l a =>
|
||||
W.RationalRect -> l a -> ModifiedLayout FullscreenFloat l a
|
||||
fullscreenFloatRect r = ModifiedLayout $ FullscreenFloat r M.empty
|
||||
fullscreenFloatRect r = ModifiedLayout $ FullscreenFloat r M.empty
|
||||
|
||||
-- | The event hook required for the layout modifiers to work
|
||||
fullscreenEventHook :: Event -> X All
|
||||
@ -188,7 +188,7 @@ fullscreenEventHook (ClientMessageEvent _ _ _ dpy win typ (action:dats)) = do
|
||||
sendMessage FullscreenChanged
|
||||
when (action == remove || (action == toggle && isFull)) $ do
|
||||
chWState $ delete (fi fullsc)
|
||||
broadcastMessage $ RemoveFullscreen win
|
||||
broadcastMessage $ RemoveFullscreen win
|
||||
sendMessage FullscreenChanged
|
||||
return $ All True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user