detached 1a34129

fix(core): focus the activated stashed window over a focused cover dialog

commit
1a341291fb69cfeec52d2600778c49b3d5a972f1
author
brice · · 2026-10-12 18:34 UTC
parent
699102b
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +20 -2
M internal/core/floating_test.go +18 -0
@@ -542,3 +542,21 @@ func TestActivateStashKeepsFullscreenFloat(t *testing.T) {
542542 t.Fatalf("back: focused %d shown %v fullscreen %d", id, w.stashShown(), w.fullscreen)
543543 }
544544 }
545+
546+// With the stash already over the cover and a dialog of the cover
547+// focused, activating a stashed window focuses it.
548+func TestActivateStashOverCoverFromCoverDialog(t *testing.T) {
549+ w := workspace()
550+ w.AddWindow(14)
551+ w.ToggleWindowStash()
552+ w.ToggleStashVisible()
553+ w.AddWindow(1)
554+ w.SetFullscreen(1, true)
555+ w.ToggleStashVisible()
556+ w.AddDialog(9, 1, 20, 10)
557+ w.FocusID(9)
558+ w.Activate(14)
559+ if id, _ := w.Focused(); id != 14 || !w.stashOverCover() || w.fullscreen != 1 {
560+ t.Fatalf("focused %d over %v fullscreen %d", id, w.stashOverCover(), w.fullscreen)
561+ }
562+}
@@ -542,3 +542,21 @@ func TestActivateStashKeepsFullscreenFloat(t *testing.T) {
542 t.Fatalf("back: focused %d shown %v fullscreen %d", id, w.stashShown(), w.fullscreen)542 t.Fatalf("back: focused %d shown %v fullscreen %d", id, w.stashShown(), w.fullscreen)
543 }543 }
544 }544 }
545+
546+// With the stash already over the cover and a dialog of the cover
547+// focused, activating a stashed window focuses it.
548+func TestActivateStashOverCoverFromCoverDialog(t *testing.T) {
549+ w := workspace()
550+ w.AddWindow(14)
551+ w.ToggleWindowStash()
552+ w.ToggleStashVisible()
553+ w.AddWindow(1)
554+ w.SetFullscreen(1, true)
555+ w.ToggleStashVisible()
556+ w.AddDialog(9, 1, 20, 10)
557+ w.FocusID(9)
558+ w.Activate(14)
559+ if id, _ := w.Focused(); id != 14 || !w.stashOverCover() || w.fullscreen != 1 {
560+ t.Fatalf("focused %d over %v fullscreen %d", id, w.stashOverCover(), w.fullscreen)
561+ }
562+}
M internal/core/layout.go +2 -2
@@ -1240,9 +1240,9 @@ func (w *Workspace) leaveFullscreen() {
12401240 func (w *Workspace) Activate(id WindowID) {
12411241 if i := w.stashIndex(id); i >= 0 && w.coverStays(id) {
12421242 if !w.stashOverCover() {
1243- w.stashOver, w.stashHidden, w.floatFocus = w.cover(), false, false
1243+ w.stashOver, w.stashHidden = w.cover(), false
12441244 }
1245- w.stashAt, w.stashFocus = i, true
1245+ w.stashAt, w.stashFocus, w.floatFocus = i, true, false
12461246 w.focusModal(0)
12471247 return
12481248 }
@@ -1240,9 +1240,9 @@ func (w *Workspace) leaveFullscreen() {
1240 func (w *Workspace) Activate(id WindowID) {1240 func (w *Workspace) Activate(id WindowID) {
1241 if i := w.stashIndex(id); i >= 0 && w.coverStays(id) {1241 if i := w.stashIndex(id); i >= 0 && w.coverStays(id) {
1242 if !w.stashOverCover() {1242 if !w.stashOverCover() {
1243- w.stashOver, w.stashHidden, w.floatFocus = w.cover(), false, false1243+ w.stashOver, w.stashHidden = w.cover(), false
1244 }1244 }
1245- w.stashAt, w.stashFocus = i, true1245+ w.stashAt, w.stashFocus, w.floatFocus = i, true, false
1246 w.focusModal(0)1246 w.focusModal(0)
1247 return1247 return
1248 }1248 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 25

Tags 10

↑↓ moveenter openesc close