Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix unintended window hiding #925

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
philib committed Jan 30, 2025
commit 6a6d913deefadd97615f54fc7fa4f4c8df9124ea
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -50,6 +50,11 @@
- Added `focusWorkspace` for focusing workspaces on the screen that they
belong to.

* `XMonad.Util.NamedScratchPad`

- Fix unintended window hiding in `nsSingleScratchpadPerWorkspace`.
Only hide the previously active scratchpad.

## 0.18.1 (August 20, 2024)

### Breaking Changes
2 changes: 1 addition & 1 deletion XMonad/Util/NamedScratchpad.hs
Original file line number Diff line number Diff line change
@@ -309,7 +309,7 @@ nsSingleScratchpadPerWorkspace :: NamedScratchpads -> X ()
nsSingleScratchpadPerWorkspace scratches =
nsHideOnCondition $ \ _lastFocus curFocus winSet hideScratch -> do
allScratchesButCurrent <-
filterM (liftA2 (<||>) (pure . (/= curFocus)) (`isNSP` scratches))
filterM (liftA2 (<&&>) (pure . (/= curFocus)) (`isNSP` scratches))
(W.index winSet)
whenX (isNSP curFocus scratches) $
for_ allScratchesButCurrent hideScratch