From 968f02280591c17611fa9b04c3de730a0ed5f247 Mon Sep 17 00:00:00 2001 From: foxnne Date: Fri, 9 Oct 2026 13:10:24 -0500 Subject: [PATCH] deps: SDL forks carry tests, and Wayland loads on older libxkbcommon Pins sdl_zig fizzy-1.0.3+3.4.16-8 (SDL fizzy-3.4.16-8). fizzyedit/SDL now carries fizzy's own test suites beside its patches, and fizzyedit/sdl_zig a `zig build test-fizzy` step that runs them in CI. The new pin also takes SDL patch 8: built against libxkbcommon 1.10+ headers, SDL required `xkb_keymap_mod_get_mask()`, so on Ubuntu 24.04 (1.6) or Debian 12 (1.5) the Wayland driver reported itself unavailable and fizzy fell back to X11. The symbol is now optional at runtime, with SDL's existing fallback for the masks. A suite proves it: red on ubuntu:24.04 without the patch, green on 24.04 and 26.04 with it. DEPENDENCIES.md records patch 8, the three suites (patches 1, 8 and 6), sdl_zig's step and jobs, and the tags. Fixes #289. Part of #280. Co-Authored-By: Claude Opus 5.5 --- build.zig.zon | 4 +-- docs/DEPENDENCIES.md | 58 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 55 insertions(+), 7 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 789db55ed..95bbb3d3f 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -33,8 +33,8 @@ // `fizzy` branch, building fizzyedit/SDL's `fizzy-3.4` — see docs/DEPENDENCIES.md. Plugins // draw through dvui's proxy backend and never link SDL. .sdl = .{ - .url = "https://github.com/fizzyedit/sdl_zig/archive/8e88dba6674de7545b4ce34c1b537cc555276672.tar.gz", - .hash = "sdl-1.0.3+3.4.16-i4QD0VoLqgCMgVYwc5gbSjltGMgkLubNwKfMR98Yh9TE", + .url = "https://github.com/fizzyedit/sdl_zig/archive/a02dda8d4c12bfd6132f24f4d00bcdbc8a274b52.tar.gz", + .hash = "sdl-1.0.3+3.4.16-i4QD0SIUqgAsokLeE08dWLGiUN4cL3ZDOM94hrJ-DTam", .lazy = true, }, .icons = .{ diff --git a/docs/DEPENDENCIES.md b/docs/DEPENDENCIES.md index 0a0645ad3..ef6e94170 100644 --- a/docs/DEPENDENCIES.md +++ b/docs/DEPENDENCIES.md @@ -158,8 +158,38 @@ Fizzy adapts to two upstream behaviours rather than patching them: [`docs/WINDOWS_LIVE_RESIZE.md`](WINDOWS_LIVE_RESIZE.md)). Measured only in a Windows on Arm VM so far, not on GPU hardware. Upstream: worth proposing with the macOS pair (3–5). +8. **Wayland: make `xkb_keymap_mod_get_mask()` optional at runtime** (`36dda37`, #289). Built + against libxkbcommon 1.10 or newer headers (sdl_zig uses 1.13), SDL required that symbol, so + where the system's libxkbcommon is older (Ubuntu 24.04 ships 1.6, Debian 12 ships 1.5) the + whole Wayland driver reported itself unavailable and fizzy fell back to X11. It is now + `SDL_WAYLAND_SYM_OPT`, and the keymap handler builds the modifier masks from + `xkb_keymap_mod_get_index()` when it did not load, the path builds against older headers have + always taken. For the standard xkeyboard-config keymaps both paths give the same masks. + Upstream `main` has the same problem. Upstream: worth proposing; the PR text is in #289. + +On top of the patches, **the fork's own tests** (#280): `test/testfizzy.c` runs suites on SDL's +test harness (`test/testautomation_fizzy*.c`), with no library code changed. Each suite checks one +patch and must fail on the upstream release it is based on, or, for patch 8, on the fork without +it. So far: + +- patch 1, `testautomation_fizzy_gpu.c` (`4839ede`): a transparent window claimed and presented on + Metal and Vulkan; +- patch 8, `testautomation_fizzy_xkb.c` (`213751e`): the Wayland driver loads on an older + libxkbcommon, and a German keymap's Shift, Caps Lock and AltGr levels come out right; +- patch 6, `testautomation_fizzy_wayland.c` (`a518aaf`): read from libwayland's own request trace + (`WAYLAND_DEBUG`) under headless weston, a floating window's geometry is its frame, its input + region the frame plus up to 8 units, its min/max sizes the frame's, and the published insets + what was asked; maximized and fullscreen the insets are zero; a popup anchors to the parent's + frame. Headless weston can't show a floating size the compositor chooses, tiled states, + fractional scale or xdg-decoration. What it found still to fix before proposing patch 6 is in + #280 (C2b). + +sdl_zig builds and runs them (`zig build test-fizzy`, below). A suite moves through a rebase with +its patch, and goes upstream in that patch's PR. + Tags: `fizzy-3.4.16-1` → `a4b021c`; `fizzy-3.4.16-2` → `3d6e802`; `fizzy-3.4.16-3` → `8455e58`; -`fizzy-3.4.16-4` → `2d6efde`; `fizzy-3.4.16-5` → `ee721bf`, what sdl_zig pins now. +`fizzy-3.4.16-4` → `2d6efde`; `fizzy-3.4.16-5` → `ee721bf`; `fizzy-3.4.16-6` → `4839ede`; +`fizzy-3.4.16-7` → `36dda37`; `fizzy-3.4.16-8` → `a518aaf`, what sdl_zig pins now. ## fizzyedit/sdl_zig @@ -181,10 +211,25 @@ Tags: `fizzy-3.4.16-1` → `a4b021c`; `fizzy-3.4.16-2` → `3d6e802`; `fizzy-3.4 insets (6). Squash into 1 at the next rebase. 6. **Build fizzyedit/SDL `fizzy-3.4.16-5`** (`8e88dba`, first described as a test pin): the pin moves to SDL's Windows live-resize steps (7). Squash into 1 at the next rebase. +7. **A `test-fizzy` step running fizzy's SDL patch suites** (`0f6a2a8`): `zig build test-fizzy -- + ` builds SDL_test and the fork's suites against the library this package already builds + and runs them (`--filter`, `--require-gpu `); a plain `zig build` is unchanged. CI runs + them on Linux (lavapipe, under Xvfb and headless weston) and on the hosted macOS runners, which + have a Metal device. The pin moves to SDL's `fizzy-3.4.16-6`. Fizzy-only; squash the pin into 1 + at the next rebase. +8. **Run the Wayland keyboard suite on Ubuntu 24.04 and 26.04** (`264af2a`): CI job + `test-fizzy-xkb`, weston's X11 backend inside `Xvfb -noreset` with a German layout (weston's + headless backend has no keyboard), in `ubuntu:24.04` (libxkbcommon 1.6, the oldest we support) + and `ubuntu:26.04` (1.13), so both of patch 8's paths run. The pin moves to SDL's + `fizzy-3.4.16-7`; squash it into 1 at the next rebase. +9. **Run the Wayland frame-insets suite under headless weston** (`a02dda8`): CI job + `test-fizzy-wayland-insets` at output scale 1 and 2, in `ubuntu:26.04`. The pin moves to SDL's + `fizzy-3.4.16-8`; squash it into 1 at the next rebase. Tags: `fizzy-1.0.3+3.4.16-1` → `60114a1`; `fizzy-1.0.3+3.4.16-2` → `5950760`; `fizzy-1.0.3+3.4.16-3` → `48468b7`; `fizzy-1.0.3+3.4.16-4` → `58abe38`; -`fizzy-1.0.3+3.4.16-5` → `8e88dba`, the commit fizzy pins now. +`fizzy-1.0.3+3.4.16-5` → `8e88dba`; `fizzy-1.0.3+3.4.16-6` → `0f6a2a8`; +`fizzy-1.0.3+3.4.16-7` → `264af2a`; `fizzy-1.0.3+3.4.16-8` → `a02dda8`, the commit fizzy pins now. ## Bumping @@ -214,9 +259,12 @@ Metal view (`SDL_cocoawindow.{h,m}`, `SDL_cocoametalview.m`, one hint in `SDL_hi `clang -fsyntax-only -fobjc-arc` on the `.m` files with the macOS SDK is enough to push, and the real check is a drag on a Mac: `scripts/live-resize/run.sh` (`docs/MACOS_LIVE_RESIZE.md`). Patch 6 touches `SDL_waylandwindow.c`'s toplevel configure, `ConfigureWindowGeometry`, the min/max sizes -and the popup anchoring, beside two new fields in `SDL_waylandwindow.h`; its check is a Linux -build of fizzy and, on a GNOME desktop, a floating window whose shadow passes clicks through and -whose frame maximizes to the work area. After resolving, compile the file for Windows before pushing; it +and the popup anchoring, beside two new fields in `SDL_waylandwindow.h`; its check is +`test-fizzy-wayland-insets` in sdl_zig's CI, then a Linux build of fizzy and, on a GNOME desktop, +a floating window whose shadow passes clicks through and whose frame maximizes to the work area +(the parts headless weston can't show). Patch 8 touches one line of `SDL_waylandsym.h` and the +modifier masks in `SDL_waylandevents.c`'s keymap handler; its check is `test-fizzy-xkb` in sdl_zig's +CI. After resolving, compile the file for Windows before pushing; it needs no build of the rest of SDL: `zig cc -target x86_64-windows-gnu -Iinclude -Iinclude/build_config -Isrc -Isrc/video/khronos -c src/gpu/d3d12/SDL_gpu_d3d12.c -o /tmp/d3d12.o`. CI's Windows cross-build (`ci.yml`) then builds it into fizzy.