Skip to content

Commit 6a6d913

Browse files
committed
fix unintended window hiding
the refactoring that introduced `nsHideOnCondition` caused a misbehaviour in `nsSingleScratchpadPerWorkspace`, leading to unintended window hiding. Now, when opening a new scratchpad, only the previous active scratchpad is hidden.
1 parent 4fc3642 commit 6a6d913

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGES.md

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
- Added `focusWorkspace` for focusing workspaces on the screen that they
5151
belong to.
5252

53+
* `XMonad.Util.NamedScratchPad`
54+
55+
- Fix unintended window hiding in `nsSingleScratchpadPerWorkspace`.
56+
Only hide the previously active scratchpad.
57+
5358
## 0.18.1 (August 20, 2024)
5459

5560
### Breaking Changes

XMonad/Util/NamedScratchpad.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ nsSingleScratchpadPerWorkspace :: NamedScratchpads -> X ()
309309
nsSingleScratchpadPerWorkspace scratches =
310310
nsHideOnCondition $ \ _lastFocus curFocus winSet hideScratch -> do
311311
allScratchesButCurrent <-
312-
filterM (liftA2 (<||>) (pure . (/= curFocus)) (`isNSP` scratches))
312+
filterM (liftA2 (<&&>) (pure . (/= curFocus)) (`isNSP` scratches))
313313
(W.index winSet)
314314
whenX (isNSP curFocus scratches) $
315315
for_ allScratchesButCurrent hideScratch

0 commit comments

Comments
 (0)