feat: publish adaptive-link OSD contract and keep overlay above video (#3)

This commit is contained in:
2026-10-18 08:02:18 +02:00
parent f0d5052ccb
commit 79ea5d62b7
14 changed files with 616 additions and 81 deletions
+24
View File
@@ -286,6 +286,30 @@ func TestOSDEventMaskNeverSelectsDeviceInput(t *testing.T) {
}
}
func TestStackReassertTargetOnlyAboveLiveTrackedVideo(t *testing.T) {
// Window managers promote fullscreened video to the top of their
// stacking order after the video-appear restack, burying the OSD
// overlay; the overlay's refresh must re-assert its place above the
// tracked video window — and only the OSD overlay may do so.
windows := map[xproto.Window]struct{}{0x20: {}}
if target, ok := stackReassertTarget(RoleAbove, true, 0x20, windows); !ok || target != 0x20 {
t.Fatalf("target=%v ok=%v want the tracked video window", target, ok)
}
if _, ok := stackReassertTarget(RoleBelow, true, 0x20, windows); ok {
t.Fatal("the fallback canvas must never re-assert stacking")
}
if _, ok := stackReassertTarget(RoleAbove, false, 0x20, windows); ok {
t.Fatal("no re-assert while video is absent")
}
if _, ok := stackReassertTarget(RoleAbove, true, 0x30, windows); ok {
t.Fatal("a stale top video window must not be restacked against")
}
if _, ok := stackReassertTarget(RoleAbove, true, 0, windows); ok {
t.Fatal("no tracked video window means nothing to re-assert")
}
}
func TestTransparentShapesEmptyInputAndOutput(t *testing.T) {
var input, output bool
for _, kind := range transparentShapeKinds() {