Commita342bd51Recorded25 Sep 2026Repositorysigil-desktop
Version 0.12.0: README and CHANGELOG
Changed
CHANGELOG.md | 21 +++++++++++++++++++++
README.md | 22 ++++++++++++++++++++--
package.sgl | 2 +-
3 files changed, 42 insertions(+), 3 deletions(-)Diff
CHANGELOG.mdmodified
@@ -9,6 +9,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
9
10
## [Unreleased] 11
+12
## [0.12.0] - 2026-09-25+13
+14
### Added+15
+16
- **Cursor capture for mouse look.** `(set-cursor-captured! on?+17
[escape-releases?])` hides the cursor and holds it on the window+18
(GLFW's disabled cursor mode, plus raw mouse motion where the platform+19
has it); it answers whether the cursor is now captured, and+20
`(cursor-captured?)` says so later, both read from GLFW's input mode (a+21
platform that cannot capture answers `#f`). Losing the window focus always+22
releases the capture, and Escape does too unless `escape-releases?` is+23
`#f`, so a player is never left with a hidden cursor; the Escape key+24
still reaches the game.+25
- `(mouse-dx)` and `(mouse-dy)`: the mouse's motion since the last frame+26
in framebuffer pixels, summed from the cursor callback and cleared with+27
the other per-frame input. A capture change re-reads the position, so+28
starting or ending a capture adds no jump and drops no motion; the+29
position reported as the pointer enters the window is not counted.+30
- `test/test-cursor-live.sgl`: drives all of it with xdotool on a+31
headless X server (see its header).+32
33
## [0.11.0] - 2026-09-24 34
35
### AddedREADME.mdmodified
@@ -50,8 +50,11 @@ directly.
50
51
The exports: `app-run`, `run-game`, `wait-frame`, `frame-width`, 52
`frame-height`, `frame-time`, `time-elapsed`, `mouse-x`, `mouse-y`,−53
`mouse-down?`, `mouse-pressed?`, `mouse-released?`, `key-down?`,−54
`key-pressed?`, `key-released?`, `quit-requested?`, `request-quit`.+53
`mouse-dx`, `mouse-dy`, `mouse-wheel`, `mouse-wheel-x`, `mouse-down?`,+54
`mouse-pressed?`, `mouse-released?`, `set-cursor-captured!`,+55
`cursor-captured?`, `key-down?`, `key-pressed?`, `key-released?`,+56
`key-code`, `quit-requested?`, `request-quit`, `window-set-size!`,+57
`fullscreen?`, `set-fullscreen!`, `monitor-size`. 58
59
Sizes and positions are framebuffer pixels: on a scaled Wayland output a 60
window asked for at 960x720 has a framebuffer of 1920x1440 at scale 2 (or@@ -63,6 +66,21 @@ the same pixels. Key symbols: `a`..`z`, `0`..`9`, `space`, `return` (or
66
went down (a held key repeating does not re-fire it); `key-down?` reports 67
the state after that frame's events. 68
+69
**Mouse look.** `(set-cursor-captured! #t)` hides the cursor and holds it+70
on the window, with raw (unaccelerated) motion where the platform offers+71
it; `(mouse-dx)` and `(mouse-dy)` are then the motion since the last+72
frame, in the same framebuffer pixels (+x right, +y down). They count+73
whether or not the cursor is captured; the pointer entering the window is+74
not motion (its position there is a jump from wherever it left). The capture ends with+75
`(set-cursor-captured! #f)`, when the window loses the focus, and when the+76
player presses Escape, unless it was asked for with+77
`(set-cursor-captured! #t #f)` (the Escape key still reaches the game+78
either way); `(cursor-captured?)` says whether it still holds (read from+79
GLFW's input mode), so a game can capture again on the next click. On+80
Wayland this uses the compositor's pointer constraints; a compositor+81
without them leaves the cursor free and `set-cursor-captured!` answers+82
`#f`.+83
84
## Environment 85
86
- `SIGIL_DESKTOP_PLATFORM=wayland|x11|win32|cocoa` forces the platform.package.sglmodified
@@ -124,7 +124,7 @@
124
125
(package 126
name: "sigil-desktop"−127
version: "0.11.0"+127
version: "0.12.0" 128
sigil: "0.20" 129
description: "Desktop host layer for Sigil (window, GL context, input, frame clock) over GLFW" 130
;; The repository was sigil/sigil-app on Codeberg through 0.9.x and is