The bridged SDL_QUIT still has to survive the app's event loop; apps
that prefer determinism (or whose backend never latches pushed quit
events) can instead poll the recorded close request next to their tray
actions and run their own close flow.
SDL2 delivers the main window's close request (X button, Alt+F4, WM
delete) as SDL_WINDOWEVENT_CLOSE; the raylib SDL backend only latches
SDL_QUIT, so the close button did nothing. The event watch records
close requests for windows that are not ours, and PumpUIWindows -
called by SetUIFrame once per frame, where calling into SDL is safe -
pushes the bridged SDL_QUIT.
Borderless secondary windows had no drag support on the SDL path at
all (IsUIWindowDragged was a stub): the watch now records press,
relative motion and release, and PumpUIWindows applies the window
move, mirroring the Xlib path. GetUIWindowPosition also stops
reporting a constant 0,0.
AppImages are per-arch, so the download key is now appimage-amd64 /
appimage-arm64 (windows stays bare — the zip bundles every arch exe).
Publishers with a single arch can keep one artifact; multi-arch
publishers list one channel per arch and each machine resolves its
own. Tests and the Go binding updated; nothing has shipped under the
old key yet.
kry_http grows a streaming file sink (kry_http_download) with byte and
fraction progress, sized for artifacts instead of in-memory bodies.
kry_sha256 adds dependency-free FIPS 180-4 hashing (streaming + file +
hex compare). kry_update ties them together: appcast-channel downloads
staged under XDG_DATA_HOME/LOCALAPPDATA with sha256 verification (bad
files are removed), AppImage staging that copies next to the running
image and atomically renames over it (plus re-exec in apply), and a
Windows portable swap script spawned detached from %TEMP%. Tests cover
hash vectors, verified/failed downloads via file://, and AppImage
staging; the exec'ing apply path stays untested by design.
Appcast fetch/parse over kry_http + kry_json, semver compare, and
desktop channel detection (AppImage/Snap/Flatpak env, /usr|/opt
package installs, Windows portable). Poll-based so a frame loop can
watch it; file:// appcasts keep tests offline. Also stub
kry_http_partial in the no-libcurl branch so nothing links unresolved.
Apps had no way to follow the system locale - inbe hard-defaulted to
English for every fresh profile. GetDefaultLocaleCode resolves
LANGUAGE/LC_ALL/LC_MESSAGES/LANG down to an available catalog
(pt_BR.UTF-8 -> pt) and returns "en" when nothing matches.
The Aero widget style derives its glass tints from whichever palette is
active, so a 13th palette entry was redundant. Remove THEME_AERO (and
its ini mirrors, locale label and picker slot); the style now defaults
to Sky. Saved theme ids beyond the shrunken count normalize through the
existing out-of-range fallback.
KrySwDirty previously reported the full frame. Drawing ops now union
their clip-intersected bounds into an accumulator (fill_rect covers
rects, circles, rings, blits and the bitmap font; text marks its
string bbox so the atlas path is included), and KrySwDirty became
one-shot: it reports everything drawn since the previous read and
resets, so hosts can present partial frames.
Add THEME_STYLE_AERO after MATERIAL so existing app clamps treat it as
invalid (SYSTEM fallback) until they opt in. The style renders Windows
Vista/7 glass from plain primitives only - translucent fills, gloss
highlights, hover glow, layered shadows, inset fields, gradient tracks -
so every backend (raylib, Android, web, software, null) draws the same
picture.
- UIStyleTokens preset: 4px/8px radii, translucent control/panel alpha,
gloss shine, soft shadow offset
- New src/ui/ui_aero.c: UIAeroScheme derived from the active palette
(GetUIAeroScheme) plus paint helpers for controls, glass panels,
inset fields and gradient tracks
- ui_draw_control_background/ui_draw_box_background route Aero through
the new helpers, so shared-path widgets pick glass up for free
- New THEME_AERO palette (13th, the style default) with sky-glass light
and slate-blue dark scopes + themes/aero*.ini mirrors
- Theme settings picker offers the style; locale gains theme_aero
- Go binding ThemeStyleAero
- SetDesktopTrayIcon(path) swaps the tray icon at runtime (empty restores
the icon InitDesktopTray resolved): the emblem/attention state apps show
while unseen notifications wait. gtk_dl gains gtk_status_icon_set_from_file.
- SendNotificationAction + PollNotificationAction extend the notification
API with one action button per popup on the GDBus backend: Notify's
daemon id is kept with the caller's URL, an ActionInvoked subscription
resolves the click, and Poll hands (action, url) to the app's main loop
while pumping the dispatch context so it also works without one. Other
backends degrade to the plain send.
- go/kryui: bindings (SetNotificationAppName, NotificationSupported,
SendNotificationAction, PollNotificationAction, SetDesktopTrayIcon).
The secondary-window presenter had no callers and no build coverage:
nothing compiled the UI_WINDOW_HAVE_SDL branch (the Wayland and
SDL-bundled path), and no test exercised the public API at all, so
recent presenter fixes could only be validated by reading the code.
- Compile ui_window.c with -DUI_WINDOW_HAVE_SDL in make test so the SDL
presenter cannot rot uncompiled.
- Add a ui_window smoke test covering the headless contract: Open fails
cleanly without a main window, and every entry point is NULL-safe.
- OpenUIWindow now requires IsWindowReady() on both the X11 and SDL
paths: the content texture allocation needs the app's live GL context.
- Document the -DUI_WINDOW_HAVE_SDL opt-in in ui_window.h.
src/krb/krb_caps.c: flat-file key/value storage (KRB_CAP_STORE_DIR,
atomic replace-and-append), KrbFn adaptors, and KrbCapInstallDefaults
binding storage.get/set + audio.play/stop. The raylib surface host
installs a real audio hook (LoadSound/PlaySound/StopSound) via
constructor, so cartridges on desktop get working audio; headless
hosts return -1 rather than pretending. tests/krb_caps_test.c covers
install count, set/get/replace/missing round-trip, and the audio
hook; wired into make test. All suites green; 11/11 cross-engine
byte-identical.
DATA nodes now carry their initializer (ints in x, CSTRs via text),
and KrbAutoMount(img) binds them into malloc'd slots. krb-run and
krb-sdl both call it, so bound counters, checkbox defaults, and
TextField contents render identically with or without generated
host binds. Cross-engine 11/11 byte-identical; suites green,
goldens regenerated.
The instrumented ui_text.c run pinned the native tier facts: ui
scale 1.125 (title tier base=27px for a 24 logical size), advances
w=9/adv=10 for 'L' — and glyph offsetY of +6 where raw stbtt gives
-15. raylib rtext.c line 730 adds (int)(ascent*scale) to every
offsetY: glyph offsets are line-top-relative. k2b_atlas now applies
the same shift; per-glyph values match the app trace exactly
('L' off=(1,6), 'a' (0,10)).
kry_sw's UI scale is per-mille (1.125 isn't expressible in integer
percent) with the same (int)(px*s+0.5) rounding as ScaleUIPx; the
native harness threads KRB_EXACT_UI_SCALE. The language cartridge
is now authored in logical units.
Native parity: 6423 -> 5765/307200; glyph positions track the
native within ~1-2px per element. Remaining: fractional-advance
storage (raylib keeps float advanceX; the u16 truncation drifts
~0.5px/glyph) and the title's measured width, under investigation.
Cross-engine: 8/8 byte-identical, suites green, goldens updated.
New VM pieces: OP_MOD, and OP_NODE_SET (pops an i16 and patches a
node's x/y/w/h through a mutable node overlay allocated on first
use). TIME is now a first-class term in expressions. The k2b program
compiler was restructured around an ordered instruction stream
(updates, draws, guard/else brackets interleaved in source order) so
conditional assignments compile correctly — previously both branches
of an if always ran, last-write-wins. Updates accept full
term-or-term-arith-term right sides including % and TIME.
examples/26_inbe_whm_session.kry: the Wim Hof session as a cartridge —
TIME -> elapsed -> phase -> triangle wave -> animated ring radius via
AnimNode('ring0','w',&radius), breath counter with clamp, in/out
phase text. Verified across frames: t=0/600ms/5s produce the exact
expected phase, radius, and breath values. Eight exactness screens
byte-identical kry_sw == SDL.
KRB_FLAG_NAV buttons write a screen id to a state path on press
(cartridge-owned navigation; no host import). k2b compiles
NavButton(label, x, y, w, h, &state.screen, id). Screens are guarded
node ranges over one state field; examples/23_inbe_app.kry is Inner
Breeze as a single 6 MB cartridge — language, settings, and manual
screens with dropdowns, scroll, checkboxes, and the breath ring,
navigable end to end (verified: Next/Manual/Back transitions via
injected clicks). Scroll containers now draw a 1px outline instead
of a filled rect. All five exactness screens byte-identical
kry_sw == SDL.
KRB_CTRL_DROPDOWN (kind 4) implemented end to end: the control record's
reserved options_off/option_count now carry consecutive NUL-terminated
option strings (k2b appends them without interning so they stay
contiguous; Dropdown(id,x,y,w,"a;b;c",&val)). Click toggles the popup,
clicking a row writes the selected index to the bound int and closes.
Loader initializes the open-dropdown slot to -1 (0 is a valid index).
New node type 13: bounded field drawing the mounted CSTR with a
blinking caret when focused (click to focus). Typed input flows through
the new optional KryBackend.text_key (codepoints, 0x08 backspace):
kry_sw queues via KrySwText (drained per frame by Advance), the raylib
surface backend maps GetCharPressed, SDL maps SDL_TEXTINPUT/BACKSPACE,
krb-web exports krb_web_text from keypress events. UTF-8 runes append
and strip correctly. k2b compiles TextField(x,y,w,h,&state.field).
Verified: click-focus, typing with backspace, and that unfocused
fields ignore keys.
SCROLL node (type 12): viewport bounds, content height in font_size,
mounted pixel offset at name_off. Children (parent = scroll index)
draw translated by -offset and clipped to the viewport; a new
optional KryBackend.wheel entry drives the offset when the pointer is
over the viewport, clamped to [0, content_h - h]. Implemented in
kry_sw (+KrySwWheel injection), the raylib surface backend, the null
and recorder backends; krb-sdl maps SDL_MOUSEWHEEL, krb-web exposes
krb_web_wheel from canvas wheel events. k2b compiles
Scroll(x, y, w, h, contentH, &state.off) ... EndScroll()
bracketing child widgets (parent-linked). Fixed a compounding-offset
bug where draw_tree's origin was mutated across children.
- k2b bakes a per-cartridge atlas (stb_truetype over the vendored
NotoSans) covering the cartridge's charset at its used pixel sizes,
embeds it as the kind 1 asset '@atlas'. K2B_FONT overrides the face.
- kry_sw renders atlas text: UTF-8 decoding, per-glyph advances,
source-over coverage blending, nearest-size scaling; measure uses
real advance widths. KrySwSetAtlas installs it; krb-run, krb-sdl,
and krb-web all load '@atlas' after KrbLoad.
- Cartridge cap raised 64 KiB -> 16 MiB (output buffer static) to fit
atlases/images; krb_cartridge_test budget adjusted. Engine goldens
regenerated (atlas advances change text layout).
- Fixed on the way: atlas record stride (18 bytes), pack buffer
ownership, and a realloc'd-header write in the baker.
Verified: 'Ag' at 24px renders as antialiased glyphs from embedded
bytes; full krb suite green.
control_radius/panel_radius were normalized 0..0.5 fractions of the
control's size, so a token tuned for a button exploded into a full
pill on tall controls (text inputs). Tokens are now unscaled pixels,
converted per-draw via ui_radius_px() (DPI-scaled, clamped to 0.5
normalized). Material: 4px controls / 6px panels; retro/system: 2px
controls / square panels. Removed ui_control_radius(), which leaked
the mixed-unit ambiguity.