ElyShow: the fullscreen check also requires the menu bar and Dock hidden (R2.5)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 08:22:31 -04:00
1 parent 9a126611a2
commit 35165139a8
1 file changed
+3
+3
View File
@@ -50,5 +50,8 @@ for _ in $(seq 20); do
sleep 1
done
windows | grep -qx "0 0 $screen" || fail "no show window covers the screen ($screen): $(windows | tr '\n' ';')"
# Menu bar and Dock hide; neither draws over the slide.
bars=$(swift -e 'import CoreGraphics; let l = CGWindowListCopyWindowInfo(.optionOnScreenOnly, kCGNullWindowID) as! [[String: Any]]; for w in l where ["Menubar", "Dock"].contains(w["kCGWindowName"] as? String ?? "") || (w["kCGWindowOwnerName"] as? String) == "Dock" && (w["kCGWindowLayer"] as? Int ?? 0) > 0 { print(w["kCGWindowName"] as? String ?? "Dock") }')
[ -z "$bars" ] || fail "still on screen over the show: $bars"
osascript -e 'tell application "System Events" to key code 53' >/dev/null
echo "ok: the show covers the whole screen"