fix(core): show a stash-spawned window over a fullscreen stash member
A fullscreen stash member, current or deferred while the stash was hidden, hid or replaced the window opened by a stash spawn. The member's fullscreen now ends first, through the normal path, so the new window is shown, selected and focused. The docs state that the window must appear within 5 seconds.
- commit
- f3346fae261f635ae89f2a832a5c344b7871612a
- author
- brice · · 2026-10-14 20:36 UTC
- parent
- df18de2
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
2 files · +9 -3
M docs/config.md +1 -1
| @@ -259,7 +259,7 @@ Each workspace has a stash: a strip of windows set aside with `toggle-window-sta | |||
| 259 | 259 | bind.cmd+shift+f = stash firefox | |
| 260 | 260 | ``` | |
| 261 | 261 | ||
| 262 | - | Apps that hand a launch to an already running instance (single-instance browsers, `footclient`) open their window normally. | |
| 262 | + | The window must appear within 5 seconds, otherwise it opens normally. Apps that hand a launch to an already running instance (single-instance browsers, `footclient`) open their window normally. | |
| 263 | 263 | ||
| 264 | 264 | ### Free floating windows | |
| 265 | 265 | ||
| @@ -259,7 +259,7 @@ Each workspace has a stash: a strip of windows set aside with `toggle-window-sta | |||||
| 259 | bind.cmd+shift+f = stash firefox | 259 | bind.cmd+shift+f = stash firefox | ||
| 260 | ``` | 260 | ``` | ||
| 261 | 261 | ||||
| 262 | - | Apps that hand a launch to an already running instance (single-instance browsers, `footclient`) open their window normally. | 262 | + | The window must appear within 5 seconds, otherwise it opens normally. Apps that hand a launch to an already running instance (single-instance browsers, `footclient`) open their window normally. |
| 263 | 263 | ||||
| 264 | ### Free floating windows | 264 | ### Free floating windows | ||
| 265 | 265 | ||||
M internal/core/stash.go +8 -2
| @@ -83,10 +83,16 @@ func (w *Workspace) captureStash(id WindowID) bool { | |||
| 83 | 83 | ||
| 84 | 84 | // stashSpawned puts a window opened by a stash spawn in the stash, selected | |
| 85 | 85 | // and focused, with no former column: toggle-window-stash tiles it as a new | |
| 86 | - | // column. Under a covering fullscreen window the stash shows over it. | |
| 86 | + | // column. A fullscreen stash member, current or waiting for the stash to | |
| 87 | + | // show, ends first, so the newcomer is the window on screen. Under a | |
| 88 | + | // covering fullscreen window outside the stash, the stash shows over it. | |
| 87 | 89 | func (w *Workspace) stashSpawned(id WindowID) { | |
| 90 | + | if w.fullscreen != 0 && w.stashIndex(w.fullscreen) >= 0 { | |
| 91 | + | w.endFullscreen() | |
| 92 | + | } | |
| 93 | + | w.hiddenFullscreen = 0 | |
| 88 | 94 | w.addStash(Float{ID: id}) | |
| 89 | - | if w.cover() != 0 && w.stashIndex(w.cover()) < 0 { | |
| 95 | + | if w.cover() != 0 { | |
| 90 | 96 | w.showStashOver() | |
| 91 | 97 | } | |
| 92 | 98 | } | |
| @@ -83,10 +83,16 @@ func (w *Workspace) captureStash(id WindowID) bool { | |||||
| 83 | 83 | ||||
| 84 | // stashSpawned puts a window opened by a stash spawn in the stash, selected | 84 | // stashSpawned puts a window opened by a stash spawn in the stash, selected | ||
| 85 | // and focused, with no former column: toggle-window-stash tiles it as a new | 85 | // and focused, with no former column: toggle-window-stash tiles it as a new | ||
| 86 | - | // column. Under a covering fullscreen window the stash shows over it. | 86 | + | // column. A fullscreen stash member, current or waiting for the stash to |
| 87 | + | // show, ends first, so the newcomer is the window on screen. Under a | |||
| 88 | + | // covering fullscreen window outside the stash, the stash shows over it. | |||
| 87 | func (w *Workspace) stashSpawned(id WindowID) { | 89 | func (w *Workspace) stashSpawned(id WindowID) { | ||
| 90 | + | if w.fullscreen != 0 && w.stashIndex(w.fullscreen) >= 0 { | |||
| 91 | + | w.endFullscreen() | |||
| 92 | + | } | |||
| 93 | + | w.hiddenFullscreen = 0 | |||
| 88 | w.addStash(Float{ID: id}) | 94 | w.addStash(Float{ID: id}) | ||
| 89 | - | if w.cover() != 0 && w.stashIndex(w.cover()) < 0 { | 95 | + | if w.cover() != 0 { |
| 90 | w.showStashOver() | 96 | w.showStashOver() | ||
| 91 | } | 97 | } | ||
| 92 | } | 98 | } | ||