mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-24 13:22:23 +00:00
asdf
This commit is contained in:
parent
4e64f432c9
commit
cb9acf26e0
4 changed files with 13 additions and 19 deletions
Binary file not shown.
|
@ -23,9 +23,9 @@ import qualified XMonad.Util.ExtensibleState as XS
|
|||
import qualified Rofi
|
||||
import qualified DescribedSubmap
|
||||
import qualified TiledDragging
|
||||
import qualified WindowSwallowing
|
||||
--import qualified WindowSwallowing
|
||||
|
||||
--import XMonad.Hooks.WindowSwallowing as WindowSwallowing
|
||||
import XMonad.Hooks.WindowSwallowing as WindowSwallowing
|
||||
|
||||
|
||||
import Data.Foldable ( for_ )
|
||||
|
|
|
@ -102,11 +102,7 @@ swallowEventHook parentQueries childQueries event = do
|
|||
|
||||
windows
|
||||
( W.modify' (\x -> x { W.focus = childWindow })
|
||||
. copyFloatingState parentWindow childWindow
|
||||
)
|
||||
windows
|
||||
(\ws ->
|
||||
ws { W.floating = M.delete parentWindow (W.floating ws) }
|
||||
. moveFloatingState parentWindow childWindow
|
||||
)
|
||||
XS.modify (addSwallowedParent parentWindow childWindow)
|
||||
_ -> return ()
|
||||
|
@ -142,12 +138,9 @@ swallowEventHook parentQueries childQueries event = do
|
|||
(\ws ->
|
||||
updateCurrentStack
|
||||
(const $ Just $ oldStack { W.focus = parent })
|
||||
$ copyFloatingState childWindow parent
|
||||
$ moveFloatingState childWindow parent
|
||||
$ ws { W.floating = oldFloating }
|
||||
)
|
||||
windows
|
||||
(\ws -> ws { W.floating = M.delete childWindow (W.floating ws) })
|
||||
|
||||
-- after restoring, we remove the information about the swallowing from the state.
|
||||
XS.modify $ removeSwallowed childWindow
|
||||
XS.modify $ setStackBeforeWindowClosing Nothing
|
||||
|
@ -168,15 +161,15 @@ currentStack :: W.StackSet i l a sid sd -> Maybe (W.Stack a)
|
|||
currentStack = W.stack . W.workspace . W.current
|
||||
|
||||
|
||||
-- | copy the floating related state of one window to another window in a StackSet.
|
||||
copyFloatingState
|
||||
-- | move the floating state from one window to another, sinking the original window
|
||||
moveFloatingState
|
||||
:: Ord a
|
||||
=> a -- ^ window to copy from
|
||||
-> a -- ^ window to copy to
|
||||
=> a -- ^ window to move from
|
||||
-> a -- ^ window to move to
|
||||
-> W.StackSet i l a s sd
|
||||
-> W.StackSet i l a s sd
|
||||
copyFloatingState from to ws = ws
|
||||
{ W.floating = maybe (M.delete to (W.floating ws))
|
||||
moveFloatingState from to ws = ws
|
||||
{ W.floating = M.delete from $ maybe (M.delete to (W.floating ws))
|
||||
(\r -> M.insert to r (W.floating ws))
|
||||
(M.lookup from (W.floating ws))
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Progress 0/2 Progress 1/2: my-xmonad
|
Loading…
Reference in a new issue