AtlatestRepositorysigil-desktop
1# Changelog
2
3Versions are synced with Sigil releases. A missing entry indicates no changes for that version.
4
5All notable changes to this project will be documented in this file.
6
7The format is based on [Keep a Changelog](https://keepachangelog.com/),
8and this project adheres to [Semantic Versioning](https://semver.org/).
9
10## [Unreleased]
12## [0.14.0] - 2026-09-26
14### Added
16- `(window-focused?)`: `#t` while the window has the input focus, `#f`
17 when another window has it (and `#f` without a window), read from GLFW
18 at the call (`GLFW_FOCUSED`). A program polls it once a frame to pause
19 when the player switches away. On Wayland it is `#f` until the
20 compositor's keyboard-enter arrives (often a frame or two after the
21 window opens), so pause on `#f` only after a first `#t`.
22 `test/test-window.sgl` covers the
23 no-window answer; `test/test-focus-live.sgl` (Xvfb, xdotool) gives the
24 window the focus, moves it to the root window and gives it back, and was
25 seen red with a planted defect.
27## [0.13.0] - 2026-09-25
29### Added
31- `(window-width)` and `(window-height)`: the window's size in screen
32 units, the units `window-set-size!` takes, read from GLFW at the call
33 (`#f` without a window). `frame-width` / `window-width` is the device
34 pixel ratio, so a program sizing its window to whole multiples of a
35 pixel-art view can ask for the right size on a scaled output (HiDPI
36 Wayland, a Retina Mac). Without them a program could not snap its
37 window to whole scales on a scaled output at all.
38 `test/test-window.sgl` and `test/test-window-live.sgl` cover both, the
39 live test seen red with a planted defect.
41## [0.12.0] - 2026-09-25
43### Added
45- **Cursor capture for mouse look.** `(set-cursor-captured! on?
46 [escape-releases?])` hides the cursor and holds it on the window
47 (GLFW's disabled cursor mode, plus raw mouse motion where the platform
48 has it); it answers whether the cursor is now captured, and
49 `(cursor-captured?)` says so later, both read from GLFW's input mode (a
50 platform that cannot capture answers `#f`). Losing the window focus always
51 releases the capture, and Escape does too unless `escape-releases?` is
52 `#f`, so a player is never left with a hidden cursor; the Escape key
53 still reaches the game.
54- `(mouse-dx)` and `(mouse-dy)`: the mouse's motion since the last frame
55 in framebuffer pixels, summed from the cursor callback and cleared with
56 the other per-frame input. A capture change re-reads the position, so
57 starting or ending a capture adds no jump and drops no motion; the
58 position reported as the pointer enters the window is not counted.
59- `test/test-cursor-live.sgl`: drives all of it with xdotool on a
60 headless X server (see its header).
62## [0.11.0] - 2026-09-24
64### Added
66- **The window: its size, fullscreen, the monitor.** Wanted by Harkfell
67 (ruling D37, David, 2026-09-24: a Knytt-style small window at whole scales
68 of the view, and fullscreen at the largest whole scale that fits).
69 - `(window-set-size! width height)` asks for a window of that size in
70 screen units (on a scaled Wayland output the framebuffer is that times
71 the scale). While fullscreen it sets the size the window comes back to.
72 A tiling window manager may not grant it: read `frame-width` and
73 `frame-height` after.
74 - `(set-fullscreen! on?)` makes the window take the whole of the monitor
75 it covers most of, at that monitor's own video mode (no mode change),
76 keeping its windowed size and position (the position where the platform
77 reports one: Wayland does not, and the compositor places the window when
78 it comes back); `#f` goes back to them. `(fullscreen?)` answers which.
79 - `(monitor-size)` answers `(width height)` of that monitor's video mode.
80 On Wayland, which reports no window position, "the monitor the window
81 covers most of" is the primary monitor, for `set-fullscreen!` too.
82 - Without a window, all four answer `#f` (`test/test-window.sgl`); with
83 one, `test/test-window-live.sgl` drives them on a display (Xvfb).
85## [0.10.2] - 2026-09-21
87### Added
89- **The mouse wheel.** `(mouse-wheel)` answers the wheel's vertical travel
90 since the last frame and `(mouse-wheel-x)` the horizontal, in GLFW's
91 units (a notch is 1.0 on most mice; vertical + is away from the user),
92 summed over the frame from GLFW's scroll callback and cleared with the
93 other per-frame input. Without a window both answer 0.0. Wanted by Crash
94 The Stack's tracker (the wheel scrolls the pattern; David, 2026-09-21).
96## [0.10.1] - 2026-09-20
98### Added
100- **The rest of the keyboard.** `key-down?`, `key-pressed?` and
101 `key-released?` now know `f1`..`f25`, `page-up`/`page-down`, `home`/`end`,
102 `insert`/`delete`, `right-shift`/`right-ctrl`/`right-alt`, `caps-lock`,
103 the punctuation row (`comma` `period` `slash` `semicolon` `apostrophe`
104 `minus` `equal` `left-bracket` `right-bracket` `backslash` `grave`, or the
105 character itself as a symbol) and the keypad (`kp-0`..`kp-9`, `kp-enter`,
106 `kp-add`, `kp-subtract`). The 0.10.0 names are unchanged. Wanted by
107 Crash The Stack's tracker, whose FastTracker key model needs the
108 function keys, paging and the punctuation row natively.
109- `(key-code key)`: the GLFW key code a symbol names, or `#f` for a name
110 that is no key; needs no window, so a program can check a binding
111 before it is used and the symbol table is testable (`test/test-keys.sgl`).
113## [0.10.0] - 2026-09-20
115The package is now **sigil-desktop**, and the window is GLFW instead of
116sokol_app.
118### Changed
120- **Native Wayland on Linux.** GLFW 3.5.1 is vendored as source under
121 `vendor/glfw` (no local patches, `VENDOR.md` has the pin and inventory).
122 One binary runs as a Wayland client or under X11, picked at startup;
123 `SIGIL_DESKTOP_PLATFORM=wayland|x11` forces it. Under sokol_app the
124 Linux window was always X11 (XWayland on a Wayland desktop).
125- **No platform libraries linked.** GLFW loads libwayland-client,
126 libxkbcommon, libX11 and friends, libEGL and libGL at run time; the
127 Linux `link-flags` are empty (were `-lX11 -lXi -lXcursor`). A game's
128 NEEDED list loses those three.
129- **Framebuffer pixels follow the output scale.** On a Wayland output at
130 scale 2 a window asked for at 800x600 has a 1600x1200 framebuffer;
131 `frame-width`/`frame-height` report it and `mouse-x`/`mouse-y` are in the
132 same pixels. Fractional scales work. A program with hard-coded pixel
133 coordinates should lay out from `frame-width` and `frame-height`. On X11
134 nothing changes.
135- The library is `(sigil desktop)`. `(sigil app)` remains as a re-export
136 for this release only.
137- `app-run` raises `app-run: could not open a window` (exit 1) when no
138 display platform or GL context is available; sokol_app aborted.
139- `(quit-requested?)` answers `#t` inside the frame the close button was
140 pressed in, not only in cleanup.
141- The frame clock restarts after the init procedure, so a long asset load
142 is not the first frame's delta time.
143- GL 4.3 core is requested on Linux and Windows and 4.1 on macOS, as
144 before; the window has no default icon (sokol_app drew one).
146### Added
148- `include/sigil-desktop.h`: `sigil_desktop_framebuffer_size`,
149 `sigil_desktop_gl_get_proc_address`, `sigil_desktop_platform`, the C
150 surface sigil-graphics builds its swapchain and GL loader on.
151- `src/c/dl-search.c`: a `dlopen` that finds runtime libraries in Guix and
152 Nix profile directories (`SIGIL_LIBRARY_PATH`, `$GUIX_ENVIRONMENT/lib`,
153 nix-shell inputs, `$NIX_LD_LIBRARY_PATH`, the user and system profiles),
154 with `test/dl-search-test.sh`.
155- `guix/run-wayland.scm`, `guix/run-x11.scm`, `guix/build.scm`.
156- `SIGIL_DESKTOP_VERBOSE=1` for startup, resize and library-resolution
157 diagnostics.
159### Removed
161- `vendor/sokol` (sokol_app, sokol_time, sokol_log) and the `sapp_*`
162 symbols. sigil-graphics 0.11.4 no longer links them.
164### Requires
166- Sigil 0.20+ as before. Building on Guix needs the X11 and Wayland headers
167 in `guix/build.scm` (libx11, libxcursor, libxrandr, libxinerama, libxi,
168 libxext, xorgproto, wayland, libxkbcommon).
170### Upgrade notes
172- **Relock at the new URL.** The Codeberg repository is
173 `sigil/sigil-desktop` since 2026-09-20 (renamed in place, the old URL
174 redirects): write `(from-git url: "codeberg:sigil/sigil-desktop"
175 version: "^0.10.0")` on your own window dependency line. The
176 transitional form the tag notes describe,
177 `(from-git url: "codeberg:sigil/sigil-app" name: "sigil-desktop" ...)`,
178 still works through the redirect; a line with neither the new URL nor
179 `name:` beside a sigil-graphics 0.11.4 installs the repository twice
180 (`sigil-app` 0.9 beside `sigil-desktop` 0.10, two window stacks, a
181 duplicate `slog_func` at link time), because sigil-build keys a
182 dependency by the name it derives from the URL.
183- Delete the consumer's `build/` once (a stale `sokol-app.o` otherwise
184 stays in the old archive), then rename `(sigil app)` imports to
185 `(sigil desktop)` before 0.11.
187## [0.9.0] - 2026-06-25
189### Changed
191- Raised the toolchain requirement to Sigil 0.17. The package now
192 declares `sigil: "^0.17"` and pins `sigil-stdlib` to `^0.17`. Sigil
193 0.17 makes the package-level `sigil:` field mandatory and derives the
194 native codegen runtime (`sigil-lib`) from it, so building under the
195 0.17 compiler requires this bump. This is a minor release because
196 consumers caret-pinning sigil-app must move to the 0.17 line.
198### Requires
200- Sigil 0.17+ (`sigil-stdlib` / `sigil-lib` 0.17 line).
202## [0.8.4] - 2026-04-24
204### Fixed
206- `link-flags:` now uses `(lambda (ctx) (case (target-os ctx) ...))`
207 instead of a host-based `(case (host-os) ...)` expression. The
208 host-based form evaluated at package-load time on the host, so
209 Linux link flags (`-lX11 -lXi -lXcursor`) leaked into Windows
210 cross-compile builds; `sigil build --config windows-amd64` from a
211 Linux host would fail at the final link against zig's MinGW
212 sysroot. The procedural form re-evaluates at link time with the
213 target triple. Branches themselves are unchanged (`linux`:
214 `-lX11 -lXi -lXcursor`; `darwin`: `-framework Cocoa -framework
215 QuartzCore`; `windows`: `-lkernel32 -luser32 -lshell32 -lgdi32`).
217### Requires
219- `sigil-build` 0.14.0+ (for the `target-os` / `target-arch` helpers
220 and the procedural-link-flags dispatch in `collect-native-link-flags`).
222## [0.7.0] - 2026-03-01
224### Added
226- Added procedure specifications with inline (: ...) syntax, optional runtime checking via sigil-checks feature, and predicate combinators (any-of, maybe, list-of, none-of).
227- Added procedure specs and docstrings to all exported procedures.
228- Added procedure specs and docstrings to all exported procedures.
230## [0.5.0] - 2026-02-17
232### Added
234- Added test harness generation and build support for packages with native dependencies. Improved native package handling, added c-flags field to library struct. Fixed stdlib inclusion in bundles with custom native runtimes, directory structure preservation in compile-c-sources, and absolute sigil-lib include path resolution.
235- Added test coverage.
236- Added test coverage.
238### Fixed
240- Fixed random seed initialization crash caused by flonum-to-bignum promotion in modulo. Fixed status command crash when displaying projected versions for packages without changes.
242### Other
244- New packages split from sigil-studio. Font and image modules moved to (sigil graphics *) namespace.