Commit Graph
813 Commits
Author SHA1 Message Date
waozi 4d806387d9 Support sticky UI windows on X11 2026-08-19 20:43:22 -03:00
waozi 5d8bdc307e Fix menu bar switching between open menus 2026-08-19 20:14:28 -03:00
waozi 2ddeeecbdd Allow apps to provide system theme palettes 2026-08-19 20:13:31 -03:00
waozi faa0715f69 Fix Material bottom nav icon contrast 2026-08-19 20:08:55 -03:00
waozi 4e27375161 Apply Canvas cursor to document targets 2026-08-19 20:07:27 -03:00
waozi 8c5ded5844 Fix material tab bar spacing 2026-08-19 18:48:24 -03:00
waozi 5da8134ad0 Consolidate Kry language documentation 2026-08-19 18:31:28 -03:00
waozi 668f4d16f1 Document Kry language and publish benchmarks 2026-08-19 18:21:07 -03:00
waozi 2726d54f72 Advance Kry compile-time checks and expression KIR 2026-08-19 18:12:26 -03:00
waozi 5f04875aea Fix Canvas guide rendering and cursor 2026-08-19 17:45:51 -03:00
waozi 2d641c1137 Draw menu bars as frame overlays 2026-08-19 17:41:19 -03:00
waozi 4b6d9da887 Add reusable app runtime helpers 2026-08-19 17:19:08 -03:00
waozi 22652499d5 Fix Android notification priority signature 2026-08-19 16:55:12 -03:00
waozi a585f1ced5 Implement Canvas WebAudio backend 2026-08-19 16:35:44 -03:00
waozi 594941f421 Add reusable terminal pane widget 2026-08-19 16:19:04 -03:00
waozi 397cd3749c Avoid duplicate badge measurement 2026-08-19 16:04:50 -03:00
waozi 27ce4cbb4a Add website backend and widget matrices 2026-08-19 16:03:56 -03:00
waozi 8f8a2736e6 Align installed desktop metadata names 2026-08-19 15:53:17 -03:00
waozi e0c588cd23 Add Linux desktop integration helpers 2026-08-19 15:47:56 -03:00
waozi 85779958ab Add themed Go surface widgets 2026-08-19 15:46:01 -03:00
waozi b8931be1ae ui_window: baseline the drag at the press position 2026-08-19 15:29:49 -03:00
waozi 7055557bf5 CI: gate on public-HTTPS submodule URLs
A guard job (plain checkout, canonical script) fails the run when any
.gitmodules URL is not https:// — SSH URLs work only for a developer
with the right key and break fresh clones, CI and release builders
instead. make test runs the same check locally.
2026-08-19 15:28:04 -03:00
waozi 94f35f0952 ui_window: follow the global pointer during drags, not motion events
The exact-following drag test showed every drag ending one step short:
SDL3-style pointer batching folds the motion immediately before a
button-up into the button event, so its relative delta never arrives as
a motion event. Diff the global pointer position each frame in the pump
instead - position-derived, immune to event batching - with the release
still delivered reliably through the capture.
2026-08-19 15:26:59 -03:00
waozi a91070ce86 ui_window: flush a released drag's final motion
Button-up clears drag_active in the event watch, so the frame pump
skipped the window and dropped whatever motion was still pending -
every drag ended short of the pointer by the last step. Keep pumping a
window until its pending motion is flushed.
2026-08-19 15:24:03 -03:00
waozi e05a298d4e ui_window: capture the mouse during drags and drop per-frame position reads
Dragging a small borderless overlay visibly trailed the pointer for two
reasons: motion events stopped arriving whenever the pointer outran the
window, and every pump did a synchronous SDL_GetWindowPosition round
trip before moving. Capture the mouse for the drag duration so motion
is delivered regardless of pointer position, read the window position
once at drag start, and move from the tracked coordinates.
2026-08-19 15:21:42 -03:00
waozi aed0aff31b ui_window: expose StealUICoreWindowClose for direct close polling
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.
2026-08-19 14:57:49 -03:00
waozi 06a32a6ee6 ui_window: bridge core-window close and drag on the SDL path
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.
2026-08-19 14:51:35 -03:00
waozi 4ad9d1cbdb kry_update: arch-aware AppImage appcast key
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.
2026-08-19 14:15:24 -03:00
waozi 8b332ab17f kryui: Go bindings for kry_update_flow
StartUpdateFlow/Poll/State/Download/Apply/ExecPending wrap the C
lifecycle for the Go apps (gopass GUI first); ShowToast already covers
the notification side. Links the vendored curl like the rest of the
package's static stack. The binding test drives a file:// appcast
through available -> download -> ready -> apply, including the real
staging rename under a fake $APPIMAGE.
2026-08-19 14:10:40 -03:00
waozi c3f5e6eeef tray: resolve gtk_status_icon_is_embedded through gtk_dl
The activate guard added for XEMBED-handshake activations calls
gtk_status_icon_is_embedded, which was not part of the lazy-load
table - native links failed with an undefined reference.
2026-08-19 14:01:25 -03:00
waozi dd5f9fc356 kry_std: kry_update_flow — the embeddable self-update lifecycle 2026-08-19 14:01:25 -03:00
waozi 22c60ec6d7 tray: ignore XEMBED-handshake activations on the status icon
Some systray hosts emit a stray activate signal while docking the
status icon. Honoring it dispatched the startup activate action -
which toggles the window hidden, since the window is visible at
launch - leaving the app running with no window: nothing to click,
nothing to close. Ignore activates while the icon is unembedded and
for a short window after it becomes ready.
2026-08-19 13:56:22 -03:00
waozi af46dc6109 kry_std: self-update primitives — download, verify, apply
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.
2026-08-19 13:37:20 -03:00
waozi 845f43931e kry_std: add kry_update desktop update-check module
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.
2026-08-19 13:08:54 -03:00
waozi 4a865f45fd theme: default to the system theme source on every platform
GetDefaultPlatformThemeSource() no longer falls back to THEME_SOURCE_APP on Android; GetCurrentThemeColor() already falls back to the app palette when no system palette is readable, so SYSTEM is safe everywhere. Also expose SetThemeSource/SetThemeMode (plus ThemeSource/ThemeMode consts) in the go/kryui bindings and the Runtime parity interface.
2026-08-19 12:09:07 -03:00
waozi d6db5a7908 canvas: zero-init LoadFont's failure return
LoadFont returned an uninitialized Font when the file was missing
(clang -Wuninitialized, visible in downstream web builds); callers
check font.glyphs == NULL, so return the zeroed struct instead.
2026-08-18 22:36:33 -03:00
waozi 2fc1318a63 canvas: dedupe the JS glue (ctxNow/col/makeCanvas, rounded radius)
The ctx-resolution prologue, rgba string concat, and offscreen-canvas
allocation were repeated across the EM_JS wrappers; they now live as
helpers on the boot state. js_glyph_metrics keeps its own DOM-canvas
preference on purpose: glyph rasterization must see document.fonts.
The node call-sequence gate still records the identical 413-call trace.
2026-08-18 22:31:54 -03:00
waozi 7b6048a9df canvas: split the backend into per-concern sources
canvas_backend.c (1882 lines) becomes canvas_window/input/draw/texture/
text/os/audio.c plus canvas_internal.h, one file per banner section the
monolith had already grown. Pure code motion: the node call-sequence
gate records an identical 413-call trace before and after.

The canvas branches in Makefile, mk/common.mk, and examples/Makefile no
longer append the backend file on top of the src/ find sweep — that
would have compiled every canvas TU twice. docs: BACKENDS.md path and
empty-TU wording, FEATURE_MATRIX.md stale 'approximated' note.
2026-08-18 22:29:08 -03:00
waozi e0af9509c4 canvas: frame counter and last-op diagnostics in the JS state 2026-08-18 19:56:49 -03:00
waozi c56d3d7232 canvas: null-grade the rest of the audio surface 2026-08-18 19:42:02 -03:00
waozi 63edb0f561 canvas: SaveFileData/Text, ChangeDirectory, GetWorkingDirectory 2026-08-18 19:21:42 -03:00
waozi b15d70ee51 canvas: IsWindowFocused on the surface (dropdown hover uses it) 2026-08-18 18:51:35 -03:00
waozi b969d0f36b locale: detect the system default locale (GetDefaultLocaleCode)
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.
2026-08-18 18:47:28 -03:00
waozi 2c604531f3 theme picker: route label fallbacks through the locale catalog
The settings widget fell back to hardcoded English literals whenever an
app passed no label prop, bypassing GetLocaleText entirely - so the
whole theme section stayed English even in fully localized apps, and
the compiled-in theme_* defaults were dead. Props still win, then the
locale catalog (theme_mode_label, theme_light, theme_dark,
theme_follow_device, theme_system, theme_color_label,
theme_style_label, theme_style_system), then the English literal.
Covered by a key-resolution check in the ui_tk test.
2026-08-18 18:46:01 -03:00
waozi 79d4fed6d2 dropdown: wobbled and slow clicks must select, not just pixel-perfect taps
The press-to-release drag threshold armed on any movement past 8px,
even when the popup cannot scroll - so a touchpad click's natural
wobble flipped a click into a 'drag' and silently swallowed the
selection (the 'I press Dark and nothing happens' case on the theme
screen's fixed three-option mode popup).

Arm the drag state only when the list can actually scroll, and on
release still select when a drag never moved the list (wobble there
and back). Covered by two injected-input tests: the layout test now
runs wobbled clicks, slow hold-clicks and scroll-drags from a clean
slate per scenario, and a new theme-screen test drives the stacked
mode/palette/style dropdowns exactly like the settings screen,
including a wobbled Dark press through the two-phase settings API.
2026-08-18 18:35:42 -03:00
waozi 9e157e7b49 canvas: PauseSound and IsMusicStreamPlaying on the surface 2026-08-18 18:22:25 -03:00
waozi dae552ec17 krb-run: remove the Linux framebuffer presentation backend
The fb host (mmap of /dev/fb0 or a raw-file stand-in, xrgb8888/rgb565
dirty-rect conversion) served no user: raylib covers desktop
presentation, the Canvas2D backend covers native web, and TUI is the
remaining terminal story. Drop the --backend fb / --fb-device /
--fb-format surface; krb-run keeps the headless PNG/recording flow the
conformance tests drive.
2026-08-18 18:16:43 -03:00
waozi 6c6cc91c0f canvas: file-name utils and IsMusicValid on the surface 2026-08-18 18:12:17 -03:00
waozi eb9967ce29 theme: drop the dedicated Aero palette, keep the style palette-agnostic
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.
2026-08-18 18:08:54 -03:00
waozi 94079c9f7d canvas: cover the audio-device, wave, and image surface apps drive
inbe's app code calls the audio device lifecycle, wave loading/format,
mixed-processor hooks, GenImageColor, SetShapesTexture, and
SetTraceLogCallback directly. Add null-grade implementations (and a
real GenImageColor fill) so full apps link on the canvas backend.
2026-08-18 18:01:13 -03:00