detached ffa1efa

feat(ports): add layer surface messages and scene layers

commit
ffa1efa963dfd74b3bfb55a9c0411dc60705805e
author
brice · · 2026-09-23 16:06 UTC
parent
e930e7f
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +47 -0
M internal/ports/messages.go +47 -0
@@ -24,6 +24,43 @@ type WindowFullscreenRequest struct {
2424
2525 func (WindowFullscreenRequest) clientEvent() {}
2626
27+// Layer is a wlr-layer-shell stacking layer.
28+type Layer uint32
29+
30+const (
31+ LayerBackground Layer = iota
32+ LayerBottom
33+ LayerTop
34+ LayerOverlay
35+)
36+
37+// Anchor edges, as in zwlr_layer_surface_v1.anchor.
38+const (
39+ AnchorTop uint32 = 1
40+ AnchorBottom uint32 = 2
41+ AnchorLeft uint32 = 4
42+ AnchorRight uint32 = 8
43+)
44+
45+// LayerSurface is the committed state of one mapped layer surface. Width and
46+// Height are the committed buffer size. Margin is top, right, bottom, left.
47+// IDs share the WindowID space with windows and never collide.
48+type LayerSurface struct {
49+ ID WindowID
50+ Layer Layer
51+ Anchor uint32
52+ ExclusiveZone int32
53+ Margin [4]int32
54+ Width, Height int
55+ Namespace string
56+}
57+
58+// LayerChanged carries wayland → core the full list of mapped layer surfaces,
59+// sent whenever a layer surface maps, unmaps or commits new layer state.
60+type LayerChanged struct{ Layers []LayerSurface }
61+
62+func (LayerChanged) clientEvent() {}
63+
2764 // Mods carries input → core modifier flags.
2865 type Mods uint8
2966
@@ -151,6 +188,16 @@ type Scene struct {
151188 OutputWidth, OutputHeight int
152189 Background string
153190 Windows []SceneWindow
191+ // Layers are drawn in slice order: background and bottom before windows,
192+ // top and overlay after. A fullscreen window covers bottom and top.
193+ Layers []SceneLayer
194+}
195+
196+// SceneLayer carries core → renderer layer surface placement.
197+type SceneLayer struct {
198+ ID WindowID
199+ Layer Layer
200+ Rect Rect
154201 }
155202
156203 // SurfaceContent carries wayland → output the latest committed pixels of a
@@ -24,6 +24,43 @@ type WindowFullscreenRequest struct {
24 24
25 func (WindowFullscreenRequest) clientEvent() {}25 func (WindowFullscreenRequest) clientEvent() {}
26 26
27+// Layer is a wlr-layer-shell stacking layer.
28+type Layer uint32
29+
30+const (
31+ LayerBackground Layer = iota
32+ LayerBottom
33+ LayerTop
34+ LayerOverlay
35+)
36+
37+// Anchor edges, as in zwlr_layer_surface_v1.anchor.
38+const (
39+ AnchorTop uint32 = 1
40+ AnchorBottom uint32 = 2
41+ AnchorLeft uint32 = 4
42+ AnchorRight uint32 = 8
43+)
44+
45+// LayerSurface is the committed state of one mapped layer surface. Width and
46+// Height are the committed buffer size. Margin is top, right, bottom, left.
47+// IDs share the WindowID space with windows and never collide.
48+type LayerSurface struct {
49+ ID WindowID
50+ Layer Layer
51+ Anchor uint32
52+ ExclusiveZone int32
53+ Margin [4]int32
54+ Width, Height int
55+ Namespace string
56+}
57+
58+// LayerChanged carries wayland → core the full list of mapped layer surfaces,
59+// sent whenever a layer surface maps, unmaps or commits new layer state.
60+type LayerChanged struct{ Layers []LayerSurface }
61+
62+func (LayerChanged) clientEvent() {}
63+
27 // Mods carries input → core modifier flags.64 // Mods carries input → core modifier flags.
28 type Mods uint865 type Mods uint8
29 66
@@ -151,6 +188,16 @@ type Scene struct {
151 OutputWidth, OutputHeight int188 OutputWidth, OutputHeight int
152 Background string189 Background string
153 Windows []SceneWindow190 Windows []SceneWindow
191+ // Layers are drawn in slice order: background and bottom before windows,
192+ // top and overlay after. A fullscreen window covers bottom and top.
193+ Layers []SceneLayer
194+}
195+
196+// SceneLayer carries core → renderer layer surface placement.
197+type SceneLayer struct {
198+ ID WindowID
199+ Layer Layer
200+ Rect Rect
154 }201 }
155 202
156 // SurfaceContent carries wayland → output the latest committed pixels of a203 // SurfaceContent carries wayland → output the latest committed pixels of a

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 23

Tags 10

↑↓ moveenter openesc close