aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop
diff options
context:
space:
mode:
Diffstat (limited to 'src/Rahm/Desktop')
-rw-r--r--src/Rahm/Desktop/BorderColors.hs7
-rw-r--r--src/Rahm/Desktop/Dragging.hs2
-rw-r--r--src/Rahm/Desktop/Keys.hs5
3 files changed, 12 insertions, 2 deletions
diff --git a/src/Rahm/Desktop/BorderColors.hs b/src/Rahm/Desktop/BorderColors.hs
index aced067..f81ef06 100644
--- a/src/Rahm/Desktop/BorderColors.hs
+++ b/src/Rahm/Desktop/BorderColors.hs
@@ -6,6 +6,8 @@ import Control.Monad.Trans.Except (ExceptT (..), catchE, runExceptT, throwE)
import Control.Monad.Trans.Maybe (MaybeT (MaybeT))
import Data.Foldable (forM_)
import Data.Map (Map)
+import Data.Set (Set)
+import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Void (absurd)
import Rahm.Desktop.Common (runMaybeT_)
@@ -32,6 +34,11 @@ stackChangeHook :: StackChangeHook
stackChangeHook =
StackChangeHook
( \_ _ -> do
+ mp <- gets mapped
+ (BorderColorsState s) <- XS.get
+ XS.put $
+ BorderColorsState $
+ Map.filterWithKey (\k _ -> k `Set.member` mp) s
(BorderColorsState s) <- XS.get
updateBorderColors $ Map.keys s
)
diff --git a/src/Rahm/Desktop/Dragging.hs b/src/Rahm/Desktop/Dragging.hs
index 3bea2ad..f07ea87 100644
--- a/src/Rahm/Desktop/Dragging.hs
+++ b/src/Rahm/Desktop/Dragging.hs
@@ -72,6 +72,8 @@ sinkOnRelease = AfterDragAction $ \window _ -> sinkByWindowUnderCursor window
sinkByWindowUnderCursor :: X.Window -> X ()
sinkByWindowUnderCursor window = do
+ unpinWindow window
+
(cx, cy) <- pointerLocation
wins <- filter (/= window) <$> windowsUnderCursor
t <- fmap (W.tag . W.workspace) <$> X.pointScreen cx cy
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs
index e0b100a..3f3427d 100644
--- a/src/Rahm/Desktop/Keys.hs
+++ b/src/Rahm/Desktop/Keys.hs
@@ -834,8 +834,9 @@ keymap = runKeys $ do
shiftMod $
doc "Sink the current window into the tiling." $
- withFocused $
- windows . W.sink
+ withFocused $ \w -> do
+ unpinWindow w
+ (windows . W.sink) w
altMod $
doc "Spawn a floating terminal" $