AtlatestRepositorysigil-ui

sigil-ui / tree / test / waylandconfigure-live.sgl

1;;; Run against an owned compositor; delayed policy is a valid initial peer.
2(import (sigil test) (sigil process) (sigil ui wayland) (sigil ui raster))
3(unless (getenv "SIGIL_UI_TEST_OUTPUT")
4 (error "Run the configure fixture with the owned Wayland test session"))
5(test "initial configure supplies usable dimensions before the first buffer"
6 (let ((surface #f))
7 (dynamic-wind
8 (lambda () #f)
9 (lambda ()
10 (set! surface (open-wayland-surface title: "Initial configure check" width: 640 height: 480))
11 (assert-true (> (wayland-surface-width surface) 0))
12 (assert-true (> (wayland-surface-height surface) 0))
13 (wayland-present! surface
14 (make-canvas (wayland-surface-device-width surface) (wayland-surface-device-height surface))))
15 (lambda () (when surface (wayland-surface-close! surface))))))