detached 0273ee2

#136 build(deps): update 3 dependencies

state
merged · 81b5331 · squash
branch
bernard/deps → main
opened
bernard ·
updated
  • golang.org/x/sys v0.49.0 → v0.50.0
  • golang.org/x/sync v0.24.0 → v0.25.0 (tools)
  • golang.org/x/sys v0.49.0 → v0.50.0 (tools)
CommitSubjectAuthorDateSignatureStatus
0273ee2build(deps): update 3 dependenciesBernard SSH Verified
d75f2c1build(deps): update 3 dependenciesBernard SSH Verified

Checks 1

8 files · +23 -99
1/1
M go.mod +1 -1
@@ -16,7 +16,7 @@ require (
1616 github.com/rs/zerolog v1.35.1
1717 github.com/stretchr/testify v1.12.1
1818 golang.org/x/image v0.47.0
19- golang.org/x/sys v0.49.0
19+ golang.org/x/sys v0.50.0
2020 golang.org/x/term v0.47.0
2121 )
2222
@@ -16,7 +16,7 @@ require (
16 github.com/rs/zerolog v1.35.116 github.com/rs/zerolog v1.35.1
17 github.com/stretchr/testify v1.12.117 github.com/stretchr/testify v1.12.1
18 golang.org/x/image v0.47.018 golang.org/x/image v0.47.0
19- golang.org/x/sys v0.49.019+ golang.org/x/sys v0.50.0
20 golang.org/x/term v0.47.020 golang.org/x/term v0.47.0
21 )21 )
22 22
M go.sum +2 -2 generated file: collapsed
M internal/core/spawn_placement.go +2 -4
@@ -199,10 +199,8 @@ func sameApp(a, b ports.WindowMapped) bool {
199199 // Callers pass only visible, non-quiet, non-floating arrivals (a rule
200200 // floating it included); same-app windows keep their ordinary column.
201201 func (c *Core) placeLaunched(v ports.WindowMapped, sc *screen, w *Workspace, cells int) bool {
202- // A shown capturing stash takes the window instead (addWindow), unless
203- // a fullscreen window covers the output: a window launched by its group
204- // stays with it, under the stash shown over it.
205- if v.Floating || v.Parent != 0 || v.Remap || sc.mon.captures(w) && w.Cover() == 0 {
202+ // A shown capturing stash takes the window instead (addWindow).
203+ if v.Floating || v.Parent != 0 || v.Remap || sc.mon.captures(w) {
206204 return false
207205 }
208206 l := c.launcherOf(v.ID)
@@ -199,10 +199,8 @@ func sameApp(a, b ports.WindowMapped) bool {
199 // Callers pass only visible, non-quiet, non-floating arrivals (a rule199 // Callers pass only visible, non-quiet, non-floating arrivals (a rule
200 // floating it included); same-app windows keep their ordinary column.200 // floating it included); same-app windows keep their ordinary column.
201 func (c *Core) placeLaunched(v ports.WindowMapped, sc *screen, w *Workspace, cells int) bool {201 func (c *Core) placeLaunched(v ports.WindowMapped, sc *screen, w *Workspace, cells int) bool {
202- // A shown capturing stash takes the window instead (addWindow), unless202+ // A shown capturing stash takes the window instead (addWindow).
203- // a fullscreen window covers the output: a window launched by its group203+ if v.Floating || v.Parent != 0 || v.Remap || sc.mon.captures(w) {
204- // stays with it, under the stash shown over it.
205- if v.Floating || v.Parent != 0 || v.Remap || sc.mon.captures(w) && w.Cover() == 0 {
206 return false204 return false
207 }205 }
208 l := c.launcherOf(v.ID)206 l := c.launcherOf(v.ID)
M internal/core/stash_cover_test.go +6 -64
@@ -97,9 +97,9 @@ func TestStashShowsOverCover(t *testing.T) {
9797 }
9898 }
9999
100-// A window mapping while the stash shows over the cover is captured,
101-// shown above the cover; a dialog of the cover shows above the stash, and
102-// the override ends with its cover.
100+// Only the user shows the stash over the cover: a window mapping
101+// meanwhile is not captured, a dialog of the cover shows above the
102+// stash, and the override ends with its cover.
103103 func TestStashOverCoverEdges(t *testing.T) {
104104 synctest.Test(t, func(t *testing.T) {
105105 c, w, cover := stashCoverCore(t, OverflowFixed, false)
@@ -107,8 +107,8 @@ func TestStashOverCoverEdges(t *testing.T) {
107107 m.SetStashCapture(true)
108108 c.applyAction(ActionToggleStashVisible)
109109 m.AddWindow(5)
110- if id, _ := w.Focused(); w.StashIndex(5) < 0 || id != 5 || previewOf(t, w.Layout(), 5).Hidden || !modelStashOverCover(w) {
111- t.Fatalf("new window not captured over the cover: %+v", w.Layout())
110+ if w.StashIndex(5) >= 0 || !previewOf(t, w.Layout(), 5).Hidden {
111+ t.Fatalf("new window shown: %+v", w.Layout())
112112 }
113113 w.AddDialog(6, cover, 20, 20)
114114 if ps := w.Layout(); ps[len(ps)-1].ID != 6 {
@@ -118,7 +118,7 @@ func TestStashOverCoverEdges(t *testing.T) {
118118 t.Fatalf("dialog focus %d", id)
119119 }
120120 c.applyAction(ActionFocusColumnLeft) // back to the stash
121- if id, _ := w.Focused(); id != 5 || !modelStashOverCover(w) {
121+ if id, _ := w.Focused(); id != 3 || !modelStashOverCover(w) {
122122 t.Fatalf("from dialog: focused %d", id)
123123 }
124124 w.RemoveWindow(6)
@@ -446,61 +446,3 @@ func TestCoreActivateStashKeepsGameConfigure(t *testing.T) {
446446 func isID(id WindowID) func(Placement) bool {
447447 return func(p Placement) bool { return p.ID == id }
448448 }
449-
450-// With stash.capture, a window mapping while the stash shows over a
451-// fullscreen cover joins the stash, focused above the cover; a window of
452-// the cover's app stays with the cover instead.
453-func TestStashOverCoverMapCapture(t *testing.T) {
454- for _, tc := range []struct {
455- name string
456- next ports.WindowMapped
457- captured bool
458- }{
459- {"unrelated", ports.WindowMapped{ID: 4, PID: 9, AppID: "other"}, true},
460- {"cover app", ports.WindowMapped{ID: 4, PID: 7, AppID: "game"}, false},
461- } {
462- t.Run(tc.name, func(t *testing.T) {
463- synctest.Test(t, func(t *testing.T) {
464- c, _, _ := fadeCore(t)
465- ctx := context.Background()
466- m := c.cur().mon
467- m.SetStashCapture(true)
468- w := m.Current()
469- c.clientEvent(ctx, ports.WindowMapped{ID: 2, PID: 8, AppID: "stashed"})
470- w.ToggleWindowStash()
471- w.ToggleStashVisible()
472- c.clientEvent(ctx, ports.WindowMapped{ID: 1, PID: 7, AppID: "game"})
473- c.clientEvent(ctx, ports.WindowFullscreenRequest{ID: 1, Fullscreen: true})
474- c.applyAction(ActionToggleStashVisible)
475- if !modelStashOverCover(w) {
476- t.Fatal("stash not shown over the cover")
477- }
478- c.clientEvent(ctx, tc.next)
479- if w.Fullscreen != 1 {
480- t.Fatalf("fullscreen lost: %d", w.Fullscreen)
481- }
482- if id, _ := w.Focused(); id != 4 {
483- t.Fatalf("arrival not focused: %d", id)
484- }
485- if tc.captured && w.Cover() != 1 {
486- t.Fatalf("cover lost: fullscreen %d cover %d", w.Fullscreen, w.Cover())
487- }
488- if got := w.StashIndex(4) >= 0; got != tc.captured {
489- t.Fatalf("captured %v, stash %+v path %s", got, w.Stash, c.placementPath)
490- }
491- if !tc.captured {
492- return
493- }
494- if w.StashAt() != w.StashIndex(4) || !modelStashOverCover(w) {
495- t.Fatalf("stashAt %d", w.StashAt())
496- }
497- if p := previewOf(t, w.Layout(), 4); p.Hidden {
498- t.Fatalf("captured window hidden: %+v", p)
499- }
500- if p := previewOf(t, w.Layout(), 1); p.Hidden || !p.Fullscreen {
501- t.Fatalf("cover %+v", p)
502- }
503- })
504- })
505- }
506-}
@@ -97,9 +97,9 @@ func TestStashShowsOverCover(t *testing.T) {
97 }97 }
98 }98 }
99 99
100-// A window mapping while the stash shows over the cover is captured,100+// Only the user shows the stash over the cover: a window mapping
101-// shown above the cover; a dialog of the cover shows above the stash, and101+// meanwhile is not captured, a dialog of the cover shows above the
102-// the override ends with its cover.102+// stash, and the override ends with its cover.
103 func TestStashOverCoverEdges(t *testing.T) {103 func TestStashOverCoverEdges(t *testing.T) {
104 synctest.Test(t, func(t *testing.T) {104 synctest.Test(t, func(t *testing.T) {
105 c, w, cover := stashCoverCore(t, OverflowFixed, false)105 c, w, cover := stashCoverCore(t, OverflowFixed, false)
@@ -107,8 +107,8 @@ func TestStashOverCoverEdges(t *testing.T) {
107 m.SetStashCapture(true)107 m.SetStashCapture(true)
108 c.applyAction(ActionToggleStashVisible)108 c.applyAction(ActionToggleStashVisible)
109 m.AddWindow(5)109 m.AddWindow(5)
110- if id, _ := w.Focused(); w.StashIndex(5) < 0 || id != 5 || previewOf(t, w.Layout(), 5).Hidden || !modelStashOverCover(w) {110+ if w.StashIndex(5) >= 0 || !previewOf(t, w.Layout(), 5).Hidden {
111- t.Fatalf("new window not captured over the cover: %+v", w.Layout())111+ t.Fatalf("new window shown: %+v", w.Layout())
112 }112 }
113 w.AddDialog(6, cover, 20, 20)113 w.AddDialog(6, cover, 20, 20)
114 if ps := w.Layout(); ps[len(ps)-1].ID != 6 {114 if ps := w.Layout(); ps[len(ps)-1].ID != 6 {
@@ -118,7 +118,7 @@ func TestStashOverCoverEdges(t *testing.T) {
118 t.Fatalf("dialog focus %d", id)118 t.Fatalf("dialog focus %d", id)
119 }119 }
120 c.applyAction(ActionFocusColumnLeft) // back to the stash120 c.applyAction(ActionFocusColumnLeft) // back to the stash
121- if id, _ := w.Focused(); id != 5 || !modelStashOverCover(w) {121+ if id, _ := w.Focused(); id != 3 || !modelStashOverCover(w) {
122 t.Fatalf("from dialog: focused %d", id)122 t.Fatalf("from dialog: focused %d", id)
123 }123 }
124 w.RemoveWindow(6)124 w.RemoveWindow(6)
@@ -446,61 +446,3 @@ func TestCoreActivateStashKeepsGameConfigure(t *testing.T) {
446 func isID(id WindowID) func(Placement) bool {446 func isID(id WindowID) func(Placement) bool {
447 return func(p Placement) bool { return p.ID == id }447 return func(p Placement) bool { return p.ID == id }
448 }448 }
449-
450-// With stash.capture, a window mapping while the stash shows over a
451-// fullscreen cover joins the stash, focused above the cover; a window of
452-// the cover's app stays with the cover instead.
453-func TestStashOverCoverMapCapture(t *testing.T) {
454- for _, tc := range []struct {
455- name string
456- next ports.WindowMapped
457- captured bool
458- }{
459- {"unrelated", ports.WindowMapped{ID: 4, PID: 9, AppID: "other"}, true},
460- {"cover app", ports.WindowMapped{ID: 4, PID: 7, AppID: "game"}, false},
461- } {
462- t.Run(tc.name, func(t *testing.T) {
463- synctest.Test(t, func(t *testing.T) {
464- c, _, _ := fadeCore(t)
465- ctx := context.Background()
466- m := c.cur().mon
467- m.SetStashCapture(true)
468- w := m.Current()
469- c.clientEvent(ctx, ports.WindowMapped{ID: 2, PID: 8, AppID: "stashed"})
470- w.ToggleWindowStash()
471- w.ToggleStashVisible()
472- c.clientEvent(ctx, ports.WindowMapped{ID: 1, PID: 7, AppID: "game"})
473- c.clientEvent(ctx, ports.WindowFullscreenRequest{ID: 1, Fullscreen: true})
474- c.applyAction(ActionToggleStashVisible)
475- if !modelStashOverCover(w) {
476- t.Fatal("stash not shown over the cover")
477- }
478- c.clientEvent(ctx, tc.next)
479- if w.Fullscreen != 1 {
480- t.Fatalf("fullscreen lost: %d", w.Fullscreen)
481- }
482- if id, _ := w.Focused(); id != 4 {
483- t.Fatalf("arrival not focused: %d", id)
484- }
485- if tc.captured && w.Cover() != 1 {
486- t.Fatalf("cover lost: fullscreen %d cover %d", w.Fullscreen, w.Cover())
487- }
488- if got := w.StashIndex(4) >= 0; got != tc.captured {
489- t.Fatalf("captured %v, stash %+v path %s", got, w.Stash, c.placementPath)
490- }
491- if !tc.captured {
492- return
493- }
494- if w.StashAt() != w.StashIndex(4) || !modelStashOverCover(w) {
495- t.Fatalf("stashAt %d", w.StashAt())
496- }
497- if p := previewOf(t, w.Layout(), 4); p.Hidden {
498- t.Fatalf("captured window hidden: %+v", p)
499- }
500- if p := previewOf(t, w.Layout(), 1); p.Hidden || !p.Fullscreen {
501- t.Fatalf("cover %+v", p)
502- }
503- })
504- })
505- }
506-}
M internal/core/stash_test.go +0 -17
@@ -196,12 +196,6 @@ func TestStashCapture(t *testing.T) {
196196 {"dialog keeps focus", OverflowScroll, func(m *Monitor) { m.AddFloating(9, 10, 10) }, true, 9},
197197 {"hidden", OverflowScroll, func(m *Monitor) { m.Current().ToggleStashVisible() }, false, 4},
198198 {"under fullscreen", OverflowScroll, func(m *Monitor) { m.Current().SetFullscreen(3, true) }, false, 3},
199- {"shown over fullscreen", OverflowScroll, func(m *Monitor) {
200- w := m.Current()
201- w.FocusID(1)
202- w.SetFullscreen(1, true)
203- w.ToggleStashVisible()
204- }, true, 4},
205199 {"off", OverflowScroll, func(m *Monitor) { m.SetStashCapture(false) }, false, 3},
206200 } {
207201 t.Run(tc.name, func(t *testing.T) {
@@ -217,17 +211,6 @@ func TestStashCapture(t *testing.T) {
217211 if id, _ := w.Focused(); id != tc.focused {
218212 t.Fatalf("focused %d", id)
219213 }
220- if tc.name == "shown over fullscreen" {
221- if w.Cover() != 1 || !w.StashShown() {
222- t.Fatalf("cover %d shown %v", w.Cover(), w.StashShown())
223- }
224- if p := placement(w, 4); p.Hidden {
225- t.Fatalf("captured hidden %+v", p)
226- }
227- if p := placement(w, 1); p.Hidden || !p.Fullscreen {
228- t.Fatalf("cover hidden %+v", p)
229- }
230- }
231214
232215 })
233216 })
@@ -196,12 +196,6 @@ func TestStashCapture(t *testing.T) {
196 {"dialog keeps focus", OverflowScroll, func(m *Monitor) { m.AddFloating(9, 10, 10) }, true, 9},196 {"dialog keeps focus", OverflowScroll, func(m *Monitor) { m.AddFloating(9, 10, 10) }, true, 9},
197 {"hidden", OverflowScroll, func(m *Monitor) { m.Current().ToggleStashVisible() }, false, 4},197 {"hidden", OverflowScroll, func(m *Monitor) { m.Current().ToggleStashVisible() }, false, 4},
198 {"under fullscreen", OverflowScroll, func(m *Monitor) { m.Current().SetFullscreen(3, true) }, false, 3},198 {"under fullscreen", OverflowScroll, func(m *Monitor) { m.Current().SetFullscreen(3, true) }, false, 3},
199- {"shown over fullscreen", OverflowScroll, func(m *Monitor) {
200- w := m.Current()
201- w.FocusID(1)
202- w.SetFullscreen(1, true)
203- w.ToggleStashVisible()
204- }, true, 4},
205 {"off", OverflowScroll, func(m *Monitor) { m.SetStashCapture(false) }, false, 3},199 {"off", OverflowScroll, func(m *Monitor) { m.SetStashCapture(false) }, false, 3},
206 } {200 } {
207 t.Run(tc.name, func(t *testing.T) {201 t.Run(tc.name, func(t *testing.T) {
@@ -217,17 +211,6 @@ func TestStashCapture(t *testing.T) {
217 if id, _ := w.Focused(); id != tc.focused {211 if id, _ := w.Focused(); id != tc.focused {
218 t.Fatalf("focused %d", id)212 t.Fatalf("focused %d", id)
219 }213 }
220- if tc.name == "shown over fullscreen" {
221- if w.Cover() != 1 || !w.StashShown() {
222- t.Fatalf("cover %d shown %v", w.Cover(), w.StashShown())
223- }
224- if p := placement(w, 4); p.Hidden {
225- t.Fatalf("captured hidden %+v", p)
226- }
227- if p := placement(w, 1); p.Hidden || !p.Fullscreen {
228- t.Fatalf("cover hidden %+v", p)
229- }
230- }
231 214
232 })215 })
233 })216 })
M internal/core/workspace/stash.go +6 -5
@@ -67,8 +67,8 @@ func (w *Workspace) addStash(f Float) {
6767
6868 // CaptureStash puts a new window id in the shown stash, selected, and
6969 // reports whether it did. Like a new tile, it leaves a focused native
70-// float focused. A stash shown over a covering fullscreen window captures
71-// too; one hidden under the cover does not, and the window tiles.
70+// float focused. Under a covering fullscreen window the stash is not on
71+// screen: the window tiles as usual.
7272 func (w *Workspace) CaptureStash(id WindowID) bool {
7373 if id == 0 || !w.StashCaptures() {
7474 return false
@@ -80,9 +80,10 @@ func (w *Workspace) CaptureStash(id WindowID) bool {
8080 }
8181
8282 // StashCaptures reports whether a new window would be captured by the
83-// stash (CaptureStash): whenever the stash is on screen (StashShown),
84-// including shown over a covering fullscreen window.
85-func (w *Workspace) StashCaptures() bool { return w.StashShown() }
83+// stash (CaptureStash): it is shown and no fullscreen window covers it.
84+func (w *Workspace) StashCaptures() bool {
85+ return !w.stashHidden && len(w.Stash) > 0 && w.Cover() == 0
86+}
8687
8788 // StashSpawned puts a window opened by a stash spawn in the stash, selected
8889 // and focused, with no former column: toggle-window-stash tiles it as a new
@@ -67,8 +67,8 @@ func (w *Workspace) addStash(f Float) {
67 67
68 // CaptureStash puts a new window id in the shown stash, selected, and68 // CaptureStash puts a new window id in the shown stash, selected, and
69 // reports whether it did. Like a new tile, it leaves a focused native69 // reports whether it did. Like a new tile, it leaves a focused native
70-// float focused. A stash shown over a covering fullscreen window captures70+// float focused. Under a covering fullscreen window the stash is not on
71-// too; one hidden under the cover does not, and the window tiles.71+// screen: the window tiles as usual.
72 func (w *Workspace) CaptureStash(id WindowID) bool {72 func (w *Workspace) CaptureStash(id WindowID) bool {
73 if id == 0 || !w.StashCaptures() {73 if id == 0 || !w.StashCaptures() {
74 return false74 return false
@@ -80,9 +80,10 @@ func (w *Workspace) CaptureStash(id WindowID) bool {
80 }80 }
81 81
82 // StashCaptures reports whether a new window would be captured by the82 // StashCaptures reports whether a new window would be captured by the
83-// stash (CaptureStash): whenever the stash is on screen (StashShown),83+// stash (CaptureStash): it is shown and no fullscreen window covers it.
84-// including shown over a covering fullscreen window.84+func (w *Workspace) StashCaptures() bool {
85-func (w *Workspace) StashCaptures() bool { return w.StashShown() }85+ return !w.stashHidden && len(w.Stash) > 0 && w.Cover() == 0
86+}
86 87
87 // StashSpawned puts a window opened by a stash spawn in the stash, selected88 // StashSpawned puts a window opened by a stash spawn in the stash, selected
88 // and focused, with no former column: toggle-window-stash tiles it as a new89 // and focused, with no former column: toggle-window-stash tiles it as a new
M tools/go.mod +2 -2
@@ -42,8 +42,8 @@ require (
4242 golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a // indirect
4343 golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect
4444 golang.org/x/mod v0.42.0 // indirect
45- golang.org/x/sync v0.24.0 // indirect
46- golang.org/x/sys v0.49.0 // indirect
45+ golang.org/x/sync v0.25.0 // indirect
46+ golang.org/x/sys v0.50.0 // indirect
4747 golang.org/x/term v0.47.0 // indirect
4848 golang.org/x/text v0.43.0 // indirect
4949 golang.org/x/tools v0.52.0 // indirect
@@ -42,8 +42,8 @@ require (
42 golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a // indirect42 golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a // indirect
43 golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect43 golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect
44 golang.org/x/mod v0.42.0 // indirect44 golang.org/x/mod v0.42.0 // indirect
45- golang.org/x/sync v0.24.0 // indirect45+ golang.org/x/sync v0.25.0 // indirect
46- golang.org/x/sys v0.49.0 // indirect46+ golang.org/x/sys v0.50.0 // indirect
47 golang.org/x/term v0.47.0 // indirect47 golang.org/x/term v0.47.0 // indirect
48 golang.org/x/text v0.43.0 // indirect48 golang.org/x/text v0.43.0 // indirect
49 golang.org/x/tools v0.52.0 // indirect49 golang.org/x/tools v0.52.0 // indirect
M tools/go.sum +4 -4 generated file: collapsed

Comments00 unresolved

    no comments yet.

    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. On pages with a side panel: into the 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; in a file, click a line number to select it, shift-click for a range
    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
    l
    merge request: the list of files (j k move, enter opens, esc back)
    M
    merge request: the merge menu; there 1–3 pick the mode, D deletes the branch, enter merges
    R
    merge request: mark the head read
    esc
    close a dialog, leave a field

    Branches 33

    Tags 15

    ↑↓ moveenter openesc close