mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
MagicFocus: update to work with runLayout changes
This commit is contained in:
parent
8b27f8e0aa
commit
eb18de22c8
@ -13,7 +13,7 @@
|
|||||||
-- Automagically put the focused window in the master area.
|
-- Automagically put the focused window in the master area.
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
module XMonad.Layout.MagicFocus
|
module XMonad.Layout.MagicFocus
|
||||||
(-- * Usage
|
(-- * Usage
|
||||||
-- $usage
|
-- $usage
|
||||||
MagicFocus(MagicFocus)
|
MagicFocus(MagicFocus)
|
||||||
@ -44,9 +44,9 @@ instance (LayoutClass l Window) => LayoutClass (MagicFocus l) Window where
|
|||||||
|
|
||||||
magicFocus :: LayoutClass l Window => MagicFocus l Window -> Rectangle
|
magicFocus :: LayoutClass l Window => MagicFocus l Window -> Rectangle
|
||||||
-> Stack Window -> X ([(Window, Rectangle)], Maybe (MagicFocus l Window))
|
-> Stack Window -> X ([(Window, Rectangle)], Maybe (MagicFocus l Window))
|
||||||
magicFocus (MagicFocus l) r s =
|
magicFocus (MagicFocus l) r s =
|
||||||
withWindowSet $ \wset -> do
|
withWindowSet $ \wset -> do
|
||||||
(ws,nl) <- doLayout l r (swap s $ peek wset)
|
(ws,nl) <- runLayout (Workspace "" l (Just . swap s $ peek wset)) r
|
||||||
case nl of
|
case nl of
|
||||||
Nothing -> return (ws, Nothing)
|
Nothing -> return (ws, Nothing)
|
||||||
Just l' -> return (ws, Just $ MagicFocus l')
|
Just l' -> return (ws, Just $ MagicFocus l')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user