Window/timing: expose the display refresh rate (AppWindow.RefreshRate)#34
Merged
Conversation
Add AppWindow.RefreshRate (Hz) so a shell can pace animation to the display. On macOS it is the window's screen rate; on GLFW it is the window's monitor rate when known (set in fullscreen), otherwise 60. Addresses #11 (the vsync-clock piece). Wheel coalescing and normalized scroll deltas remain.
This was referenced Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #11 (the vsync-clock part).
A browser paces requestAnimationFrame and CSS animation to the display's refresh rate. Skyline exposed frame delta but not the rate itself.
What changed
AppWindow.RefreshRate(double, Hz) →IWindowBackend.RefreshRate.NSScreen.MaximumFramesPerSecond(accurate, including ProMotion 120 Hz).VideoMode.RefreshRatewhen GLFW knows it (set in fullscreen), otherwise 60.Scope
This is the vsync-clock slice of #11. The other two parts — per-frame wheel-event coalescing and normalized/typed scroll deltas — touch the input event shape and are left as follow-up, so #11 stays open. Used "Addresses" not "Closes."
Tests
Skyline.WindowedTests— readsRefreshRateon the default (AppKit) window and on the GLFW chrome-mode windows, asserting a positive rate (covers both backend paths).Verification
dotnet build Skyline.slnxclean (0 warnings);Skyline.Applebuilds clean on the macos workload.format-check.shclean.GlfwWindowBackend100%;AppWindow96.9% (matchesmain— the new one-line property is covered). Overall 98% matchesmain.Note
Touches the window seam, so it overlaps the open window PRs (#30/#31/#32) in
IWindowBackend/AppWindow/GLFW/FakeBackend/harness. Edits are in distinct regions, so conflicts are trivial rebases as PRs land.