From cb9acf26e0e9baf38c9a89a1fc4fdd88998f766f Mon Sep 17 00:00:00 2001 From: Leon Kowarschick Date: Sun, 21 Jun 2020 11:56:08 +0200 Subject: [PATCH] asdf --- files/.xmonad/.stack-work/stack.sqlite3 | Bin 327680 -> 327680 bytes files/.xmonad/lib/Config.hs | 4 ++-- files/.xmonad/lib/WindowSwallowing.hs | 27 +++++++++--------------- files/.xmonad/xmonad.errors | 1 + 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/files/.xmonad/.stack-work/stack.sqlite3 b/files/.xmonad/.stack-work/stack.sqlite3 index 28aea47b1ee6dd8c84d7a5f4115a58cb71197410..975764a60f5554ea2afc16ad6de71a0a9d9b410b 100644 GIT binary patch delta 223 zcmZo@5NT)-nIO%WF;T{uF=J!GviB^H85kZ<=K64xqnVMBlOa(uce3LTy~(;Coi^Kk zb1mpH}CYD*X{9Kj{ENt8id?Gv=9DHot zn-v9KvQGcm$|A(l!r;TToxhFc9^-U}A|^$y77cH1h9>*;MsA>C3#apkGP6%#(7}=f TG)YhRviB_C85q7#=K64R@&O$Y_NH7$PKHFu>5g42`jaI; zI!!m|X8GBi@u@xI6C)5aZO{0`JdamsF#{hDj|7(nhb@~YOC(bo!{W(`0^K~#4jx<# z^^%R;oGrD}4Y?S#r`t2K@K5JtWO0)($t}=NPE1P7(alKBDM&5SEw0SX$;`_xHZry_ zu(aB2_*If|dpZ-#tXh5s1_l=PcMN 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,17 +161,17 @@ 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)) - (\r -> M.insert to r (W.floating ws)) - (M.lookup from (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)) } diff --git a/files/.xmonad/xmonad.errors b/files/.xmonad/xmonad.errors index e69de29..2ecb1f7 100644 --- a/files/.xmonad/xmonad.errors +++ b/files/.xmonad/xmonad.errors @@ -0,0 +1 @@ +Progress 0/2 Progress 1/2: my-xmonad  \ No newline at end of file