Commit graph

1,863 commits

Author SHA1 Message Date
Admin
c1cee9c216 almost 2026-03-17 19:00:27 +01:00
Admin
debd9f33ed almost 2026-03-17 19:00:27 +01:00
Admin
a2a3347144 whoa 2026-03-17 19:00:27 +01:00
Admin
c3ad851992 almost reasonable 2026-03-17 19:00:27 +01:00
Kevin Boos
94711aa64b
fix SVG handling to support SVG files with fill "none" (#961)
Also fix splash example icon paths
2026-03-16 20:44:17 +01:00
Kevin Boos
a9fe1a8090
Proper widget tree fix (#956)
* Fix macos platform build failures related to PR#946

* Properly fix the new breadth-first widget tree lookup
2026-03-16 19:27:32 +01:00
Admin
1cf51b3261 fix 2026-03-16 16:13:48 +01:00
Sabin Regmi
2b79d27b44
fix macos, ios and wasm compilation (#957) 2026-03-16 15:18:33 +01:00
Admin
53fa2aa86b it compiles 2026-03-15 16:06:36 +01:00
Admin
6658d6515f slow voxels 2026-03-15 15:36:30 +01:00
Admin
b070eb7477 bricks 2026-03-15 13:35:58 +01:00
Admin
64b1a7c74b vulkan back 2026-03-15 13:20:49 +01:00
Admin
92e751ffde rapier vendored 2026-03-15 09:52:45 +01:00
Admin
da93a47467 physics 2026-03-15 09:52:45 +01:00
Admin
8ee34e0e84 otw 2026-03-15 09:52:45 +01:00
Admin
057035243b works again 2026-03-15 09:52:44 +01:00
Admin
0525556ceb works again! 2026-03-15 09:52:44 +01:00
Admin
3e3f4fd2e0 zbuf back 2026-03-15 09:52:44 +01:00
Admin
4db21794fe fixup 2026-03-15 08:49:21 +01:00
Jason Yau
f4279de855
Fix windows build errors again (#953)
* regenerate windows-rs to export D3D11_DEPTH_WRITE_MASK_ZERO constant

* fix build errors

---------

Co-authored-by: jasonqiu <jasonqiuchen@outlook.com>
2026-03-14 15:26:55 +01:00
Sabin Regmi
51f23402b5
Expose WEB URL and Location Handling (#941)
* Add web URL/location and history handling

Sync browser location and history with the WASM app on the Web platform.

- Cx API: add default CxOsApi methods browser_update_url and browser_history_go and Cx wrappers to call them.
- Web/WASM IPC: add ToWasmLocationChange, FromWasmBrowserUpdateUrl, FromWasmBrowserHistoryGo structs for message passing and register them in init.
- Web JS: emit_location_change on popstate, and implement FromWasmBrowserUpdateUrl and FromWasmBrowserHistoryGo to update history (push/replace/back/forward/go).
- Cx web runtime: add normalize_web_pathname, split_web_location and update_web_location_state helpers; handle incoming ToWasmLocationChange to update internal state and signal events; implement browser_update_url and browser_history_go to forward requests to JS and update internal location state.

These changes enable SPA-style URL updates, history navigation, and app-side reactions to browser location changes while avoiding redundant updates.

* Handle hashchange and improve URL parsing

Add a window "hashchange" listener to emit location changes and trigger the wasm pump so fragment navigation updates are handled. Update FromWasmBrowserUpdateUrl to construct URLs relative to the current full location (window.location.href) so fragment- and relative-only updates resolve correctly. Tighten split_web_location parsing to treat '/', '?', and '#' as path delimiters after a scheme, ensuring queries and fragments are detected when extracting the path.

* fix wasm run without --release

* LTO off in small profile
2026-03-14 12:13:28 +01:00
Sabin Regmi
7ab7f324b3
Use fallback cell size when glyphs missing (#942)
Replace unwraps when querying the first glyph with safe handling and provide a fallback monospace cell size if no glyph is available (e.g. on wasm while fonts are still loading). Computes a reasonable width/height from the current font_size (width = 0.6 * font_size, height = font_size) so the editor can render on first draw instead of aborting. Keeps existing cell_size and cell_offset_y calculations based on the chosen dimensions.
2026-03-14 12:13:04 +01:00
Jason Yau
f3178e65a6
Fix windows build error (#944)
* regenerate windows-rs to export missing functions

* fix compilation errors on windows

* import WS_EX_TOOLWINDOW from windows-rs instead of customizing the constant

---------

Co-authored-by: jasonqiu <jasonqiuchen@outlook.com>
2026-03-14 12:12:50 +01:00
Sabin Regmi
5a6eacd7ef
ft floating panel on macos (#945) 2026-03-14 12:12:35 +01:00
offline-ant
fe5cd60087
platform: rework custom MSE playback sessions (#946)
Co-authored-by: ant <ant@offline.click>
2026-03-14 12:12:21 +01:00
offline-ant
8189d8eab2
compositor: add projected quad and offscreen surface primitives (#947)
* draw: add draw-list transform helpers for projected composition

* draw: unroll rounded box shadow sampling in SDF shader

* platform: honor per-draw depth_write across backends

* compositor: add projected quad and offscreen surface primitives

---------

Co-authored-by: ant <ant@offline.click>
2026-03-14 12:12:05 +01:00
Kevin Boos
1feaac5494
Fix HtmlLink attribute init to handle any attr order (#948) 2026-03-14 12:11:42 +01:00
Kevin Boos
2ebeb20262
fix tooltip by force-drawing the draw list upon show/hide (#950)
Without this, the tooltip will not necessarily be shown upon its
first call to `show()`, especially if the CalloutTooltip wrapper
is driving it.
2026-03-14 12:11:32 +01:00
offline-ant
7dd4597e83
Fix PulseAudio input stream dedupe (#951)
* Fix PulseAudio input stream dedupe

* Fix PulseAudio input callback userdata cast

* Fix PulseAudio threaded mainloop waits

---------

Co-authored-by: ant <ant@offline.click>
2026-03-14 12:11:18 +01:00
Kevin Boos
f337fcd9be
Support image rotation in degrees (#952)
This was previously a feature but was lost in the 2.0 migration
2026-03-14 12:11:01 +01:00
wyenox
67d6ed2906
Fix and optimize widget search to return the shallowest match in the tree (#949) 2026-03-14 07:49:32 +01:00
Admin
f040a2f2a6 hands back! 2026-03-12 16:57:25 +01:00
Admin
bca911513d xr otw 2026-03-12 15:51:30 +01:00
Sabin Regmi
2e900f48af
Clippy Fixes Only (#939)
* clippy fixes on draw

* more clippy fixes

* more clippy fixes

* more small nits
2026-03-12 14:59:41 +01:00
Sabin Regmi
3242b11afc
Windows Blur, System Composition (#940)
* Initial plan

* feat(platform): add window visuals API and M1 backdrop wiring

Co-authored-by: wheregmis <26774729+wheregmis@users.noreply.github.com>

* feat(uizoo): add M2 GlassPanel widget and demo tab

Co-authored-by: wheregmis <26774729+wheregmis@users.noreply.github.com>

* blue example

* Apply backdrop intensity and transparency

macOS: apply visuals.backdrop_intensity to the NSVisualEffectView alpha (clamped) so backdrop intensity affects the effect view.

Windows: honor visuals.backdrop_intensity by computing an alpha-packed accent color, toggle WS_EX_LAYERED for transparent windows, call SetLayeredWindowAttributes and DwmExtendFrameIntoClientArea when needed, and set the AccentPolicy accordingly (enable blur for transparent or non-none backdrops, set gradient_color based on intensity, and set accent_flags depending on DWM attribute result).

Tests: update expected backdrop_intensity in a unit test from 4.0/1.0 to 0.25 and assert a platform op is emitted. These changes ensure backdrop intensity and transparency settings are respected across platforms.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wheregmis <26774729+wheregmis@users.noreply.github.com>
2026-03-12 14:57:09 +01:00
Admin
61a70d0ebd xr 2026-03-12 13:30:40 +01:00
Admin
0c80201e66 makepad splash 2026-03-12 09:49:30 +01:00
Admin
1bad158945 fixup 2026-03-12 09:39:47 +01:00
Admin
7895cd34fc fixup 2026-03-12 09:39:16 +01:00
Admin
cde02e2e48 fix 2026-03-11 18:15:12 +01:00
Sabin Regmi
bba8868caf
Optimize font loading and add SharedBytes (#938)
Introduce selective font loading and a SharedBytes abstraction with mmap support to reduce memory and IO overhead when handling fonts.

Key changes:
- Add SharedBytes (with MappedBytes using memmap2) and stats; switch FontData to SharedBytes and update loader/loader tests.
- Platform: add memmap2 dependency (non-wasm), new platform API helpers get_resource_abs_path and get_resource_font_bytes to prefer mmap'ed files and fall back to owned bytes.
- Font family/load changes: ensure_fonts_loaded_for_text and update_font_definitions now accept optional text to load only needed fallback fonts (CJK/emoji) based on text content and resource basename heuristics.
- Avoid eager loading of heavy bundled fallback fonts (LXGWWenKai*, NotoColorEmoji.ttf) when loading all script resources.
- Add env override MAKEPAD_TEXT_ATLAS_SIZE for text atlas size parsing and tests; add related parsing helpers and tests.
- Minor fixes: safer transmute for font_face data slice and several unit tests to validate behavior.

Overall this reduces unnecessary font resource reads/mmap usage and allows tuning text atlas size via environment.
2026-03-11 16:25:35 +01:00
Admin
feb1ecd55f dock fix 2026-03-11 10:19:58 +01:00
Admin
a6eb9906a0 hiccup 2026-03-11 10:19:58 +01:00
Admin
5170eed9af working 2026-03-11 10:19:58 +01:00
Sabin Regmi
ffbeadc173
Hotreloading Nits (#936)
* Add wasm server_manager and ownership guard

Introduce a new wasm server_manager module that implements WasmServerOwnershipGuard to manage per-workspace lock files, PID/port ownership, and safe replacement of stale or live servers. Integrate the guard into compile::run by preparing and activating the guard before starting the HTTP server; start_wasm_server now accepts the guard, returns a Result, checks bind success, activates the guard, and propagates thread join errors. The server manager includes platform-specific PID handling, port-probing, lock read/write/remove helpers, and unit tests exercising startup scenarios and lock lifecycle. Also add mod declaration and apply minor formatting/refactor cleanups across compile.rs (error formatting, whitespace, and logging improvements).

* Add startup mutex and port occupant diagnostics

Rename server_manager into top-level module and add startup mutex handling and improved diagnostics. Introduces atomic lock writes (write_file_atomically), a StartupMutexGuard with configurable timeouts/polling, and logic to detect/recover stale startup locks to prevent concurrent wasm run startups. Extends ServerManagerProbes with describe_port_occupant and implements platform-specific detection (lsof on Unix, netstat/tasklist on Windows) to provide clearer errors when ports are occupied. Updates imports (main.rs, compile.rs, mod.rs) and adds unit tests covering startup lock behavior and unknown-occupant error text.

* Improve hot-reload logging and delivery

Add clearer logging and error handling for wasm hot-reload events. Introduces hot_reload_display_name to extract a user-friendly file name, logs when a hotreload is detected, and checks tx.send result to avoid panics when the watcher channel is closed. broadcast_hot_reload_event now logs whether events were skipped (no /$watch clients) or sent and includes the delivered client count with proper pluralization.

* Check lock PID owns port and add startup timestamp

Require that a lock's PID both be alive and actually own the server port to be considered a live lock (classify_lock_state now takes listen_addr). Add parsing of a started_at timestamp in startup locks and use now_unix_millis to age out stale startup locks even if the PID is alive. Extend ServerManagerProbes with now_unix_millis and pid_owns_port, implement port_occupant_info and PortOccupant to centralize occupant detection/refinement for unix and windows, and refactor describe_port_occupant to use it. Update tests and MockProbes to exercise PID ownership checks and startup-lock aging; add tests for PID reuse (treated as stale if it doesn't own the port) and for startup lock aging.

* Hot reload: dedupe sites, add logging

Avoid duplicate ScriptMod sites during hot reload and improve diagnostics. collect_compiled_sites_for_file now tracks seen ScriptModKey values to prevent pushing duplicates. handle_cx_live_edit counts processed files and logs how many overrides were applied and from how many changed files. forward_hot_reload_fs_event logs each detected file and reports if the watcher channel is closed. Minor import cleanup and a helper hot_reload_display_name were added for nicer log output.

* shared core for reload

* Warn and fallback to unminified JS on write error

When writing the minified JS file fails, log a warning and fall back to copying the original JS file instead of returning an error. This avoids failing the build on IO/write errors (e.g. permissions or disk issues) while preserving the previous behavior of using the unminified copy when reading fails. No change to successful minification path.
2026-03-10 12:47:38 +01:00
Kevin Boos
c344dcd4fb
Support hiding a dock tabs bar (#937) 2026-03-10 08:00:44 +01:00
offline-ant
c44b456ebc
studio/runview: wait for app-ready before Wayland swapchain bootstrap (#935)
Co-authored-by: ant <ant@offline.click>
2026-03-09 20:07:03 +01:00
offline-ant
5407f085e7
studio/runview: fix Wayland bootstrap and control-text input (#934)
* studio/runview: fix Wayland stdin-loop bootstrap

* wayland: ignore control text input commits

* tools: ignore generated python bytecode

---------

Co-authored-by: ant <ant@offline.click>
2026-03-09 19:34:49 +01:00
Admin
609655aa5c wasm hotloading 2026-03-09 19:34:00 +01:00
Admin
39d107a09b wasm hotloading 2026-03-09 19:26:08 +01:00