Commit graph

479 commits

Author SHA1 Message Date
Lutz
3e8e09fbe9
fix: Single-slot UInt/SInt instance attributes render incorrectly (#922)
Co-authored-by: Lutz Paelike <lutz.paelike@ehealthafrica.org>
2026-03-08 11:26:52 +01:00
offline-ant
04dea089bd
platform: small fixes and quality improvements (#928)
- Android log levels: map log! macro levels to Android log priorities
  (ERROR=6, WARN=5, INFO=4). Some devices suppress DEBUG by default.
- cargo-makepad android: show help text instead of panicking on missing
  or invalid subcommand.
- Android build: discover .class files dynamically instead of hardcoding
  ~25 individual paths. Add Java 8 source/target flags.
- Remove deprecated AsyncTask import from MakepadNetwork.java.
- Studio stdout: add newline after JSON messages for JSON-lines parsing.
- Studio stdout: skip profiler timing in stdout mode to avoid overhead.
- Script thread: fix panic on empty call stack in call_has_me/call_has_try.
- Cursor: reset to Default on FingerHoverOut in TextFlow and TextInput.

Co-authored-by: ant <ant@offline.click>
2026-03-08 11:24:18 +01:00
offline-ant
27b910ff6c
platform: cycle tap count after triple-click so fast double-clicks keep working (#931)
process_tap_count incremented without bound. TextInput handles
tap_count 2 (select word) and 3 (select all) but ignored counts
>= 4. Rapid repeated double-clicks produced tap counts of 4, 5, 6...
hitting the _ => {} fallthrough and doing nothing.

Cycle the counter back to 1 after reaching 3 (1->2->3->1->2->3).

Co-authored-by: ant <ant@offline.click>
2026-03-08 11:22:12 +01:00
Admin
24a9b0627d remove apprs 2026-03-08 10:28:40 +01:00
Admin
b64a83fa15 oops. uids 2026-03-08 08:42:49 +01:00
Jason Yau
5d81bf9490
Add IME Support for Linux (X11) (#926)
* regenerate windows-rs to export ImmAssociateContext

* fix ime popup window still shown when TextInput has no focus

* fix ime popup window still shown when TextInput has no focus for macos

* fix ime himc state

* IME support for linux

---------

Co-authored-by: jasonqiu <jasonqiuchen@outlook.com>
2026-03-07 15:50:05 +01:00
Admin
bc6da37276 fix 2026-03-07 11:54:59 +01:00
Admin
7c5c0edeba fix shader compiler 2026-03-06 18:49:24 +01:00
Admin
42a45913d6 drumroll 2026-03-06 17:21:17 +01:00
Admin
f00f4c0560 fix shader compiler state clobber 2026-03-06 17:21:17 +01:00
Admin
0846e575b0 split f32 + uniformbuffers 2026-03-06 17:21:17 +01:00
Jason Yau
06fb9ee8eb
Fix: IME Popup Window Appears Without TextInput Focus (#924)
* regenerate windows-rs to export ImmAssociateContext

* fix ime popup window still shown when TextInput has no focus

* fix ime popup window still shown when TextInput has no focus for macos

---------

Co-authored-by: jasonqiu <jasonqiuchen@outlook.com>
2026-03-06 16:50:01 +01:00
Sabin Regmi
713628a89f
Load script resources per-handle (avoid global loads) (#923)
Replace broad cx.load_all_script_resources() calls with a targeted cx.load_script_resource(handle) to only request the specific resource needed. Refactor script resource loading (platform/src/script/res.rs) by extracting load_script_resource_impl(handle, crate_manifests) and exposing load_script_resource(handle); keep load_all_script_resources() by iterating per-handle. Improve wasm handling: resolve web_url per-resource, set explicit error states when missing, and fire async HTTP requests safely. Remove an early call to load_all_script_resources() from web startup. Additional changes: serve precompressed .br files in the local wasm dev server (with COOP/COEP headers when threaded), add wasm-specific font/theme script entries for widgets, and update various callers (draw shaders, widgets, math_view, gltf/view_splat, image) to use the per-handle loader. These changes reduce unnecessary global loads and limit network/file operations to only required resources.
2026-03-06 16:01:07 +01:00
offline-ant
d19f99d1ef
selection: clipboard delegate, primary selection, mobile handles (#912)
* selection: clipboard delegate, primary selection, mobile UI, handles, accessibility

Level 0: Route clipboard through Makepad instead of arboard. Custom
ClipboardDelegate in havishell forwards set_text/get_text/clear through
Makepad's CopyToClipboard and pending paste state. Fix Wayland serial
constraint by queuing CopyToClipboard when no serial is available.

Level 1: Primary selection (Linux). Add CxOsOp::SetPrimarySelection,
Wayland zwp_primary_selection_device_manager_v1 protocol bindings, X11
PRIMARY atom handling. HAVI stores selection text in SharedDocumentSelection
and calls set_primary_selection on change.

Level 2: Mobile clipboard actions UI. Long-press selects word and shows
native clipboard toolbar. TextCopy/TextCut events return selection text.

Level 3: Selection handle API. Add CxOsOp Show/Update/HideSelectionHandles,
Event::SelectionHandleDrag, and HAVI integration for handle drag events.
Platform stubs for all backends.

Level 4: Accessibility plumbing. Add CxOsOp::AccessibilityUpdate with
type-erased Box<dyn Any + Send> payload. HAVI implements
notify_accessibility_tree_update to forward accesskit::TreeUpdate through
Makepad. Platform no-op stubs.

* wayland: handle primary selection data_offer child objects

---------

Co-authored-by: ant <ant@offline.click>
2026-03-06 12:17:25 +01:00
Sabin Regmi
5028a602d2
Remove debug title update in redraw handler (#919)
Remove a leftover debug call that set the document title when handling ToWasmRedrawAll in platform/src/os/web/web.rs. This avoids an unnecessary DOM update used only for debugging and cleans up the redraw handler.
2026-03-06 12:16:24 +01:00
Sabin Regmi
60039d4ee9
Consider Logo or Control primary on wasm32 (#921)
Add a wasm32-specific branch in KeyModifiers::is_primary so the primary modifier is treated as true when either `logo` or `control` is set on WebAssembly targets. This preserves expected web behavior where Meta/Command or Control can act as the primary key. Also tighten the non-Apple cfg to exclude wasm32 explicitly to avoid overlapping cfg matches.
2026-03-06 12:16:08 +01:00
Lutz
4ff3be2f20
fix: iOS app crashes on device rotation (#920) 2026-03-06 12:15:52 +01:00
Sabin Regmi
8e3ae8ea1c
Add --no-threads option and runtime thread checks (#918)
Introduce a single-threaded wasm build mode and add defensive runtime handling for missing wasm threading support.

- CLI: add --no-threads flag and WasmConfig.threads to control threaded vs single-threaded builds. Parse and strip wasm-specific options before forwarding build/run args.
- Build: select target features and RUSTFLAGS based on threading; omit atomics/bulk-memory features for single-threaded builds. Adjust generated server instructions to require COOP/COEP only for threaded builds.
- Dev server: conditionally include COOP/COEP headers when serving threaded wasm artifacts.
- JS runtime (platform/src/os/web/web.js): guard audio worklet startup and thread creation on wasm._has_thread_support; make alloc_thread_stack return null with clear console warnings when required exports or alignment are missing; pass allocated thread_info to workers.

These changes enable building and running a single-threaded wasm variant without COOP/COEP server requirements and improve runtime resilience when threading features are unavailable.
2026-03-05 20:53:20 +01:00
Admin
7adc274be7 widget tree refactor 2026-03-04 09:52:17 +01:00
Admin
051f48de84 terminal window resizing stable 2026-03-04 00:25:32 +01:00
Admin
05238ee39d widget tree change 2026-03-03 21:22:58 +01:00
Admin
c0125ba11d widget tree fixup 2026-03-03 20:19:06 +01:00
Admin
98547946dd terminal wrangling 2026-03-03 13:21:53 +01:00
Admin
81483d4555 y flip webgl rendertartet 2026-03-03 09:42:54 +01:00
Admin
0f3864a44a rename network 2026-03-03 09:18:19 +01:00
Admin
17d86d145e remove origin from widget tree 2026-03-03 08:55:01 +01:00
offline-ant
91c6ea5859
texture: add set_data_u32 for resize-safe updates (#910)
Add Texture::set_data_u32(cx, width, height, data) that replaces pixel
data and dimensions in one call. Unlike put_back_vec_u32, this also
updates width/height, making it safe for image sources that change
resolution (animated images, lazy-loaded placeholders).

Co-authored-by: ant <ant@offline.click>
2026-03-03 08:52:54 +01:00
Admin
4f38c0c324 finall fix render glitch 2026-03-02 20:16:29 +01:00
Admin
5d6472c2a0 add studio proto 2026-03-02 12:30:33 +01:00
Admin
b437899d82 remote control 2026-03-02 12:07:59 +01:00
Admin
462fd3dcec remote working 2026-03-02 10:40:33 +01:00
Admin
524ac9186d cleanup 2026-03-01 23:15:39 +01:00
Admin
1ef52d6553 wasm 2026-03-01 20:22:11 +01:00
Admin
01a4985e86 backend proto splitoff 2026-03-01 10:12:00 +01:00
Admin
9c4dcebdc6 fix better errors 2026-02-28 23:19:25 +01:00
Admin
051557c569 studio2 2026-02-28 22:30:21 +01:00
Admin
0bffb98f28 studio2 otw 2026-02-28 21:27:26 +01:00
Admin
6c8716a121 add cx module 2026-02-28 12:35:13 +01:00
Admin
952e6134a9 plaintext error 2026-02-28 11:40:11 +01:00
offline-ant
d544b7335b
ios: use CVPixelBuffer-first GL/Metal bridge path (#904)
Co-authored-by: ant <ant@offline.click>
2026-02-28 11:17:48 +01:00
offline-ant
3b2e5730ae
trigger redraw on Screenshot request in windowed mode (#905)
dispatch_studio_msg pushed to screenshot_requests but never
triggered a redraw. The GL readback that captures the screenshot
only runs during the render path, so the request was never
serviced in windowed backends (Wayland, X11, macOS).

Co-authored-by: ant <ant@offline.click>
2026-02-28 11:17:35 +01:00
offline-ant
445e74de24
platform: add custom studio app message events (#906)
Co-authored-by: ant <ant@offline.click>
2026-02-28 11:17:10 +01:00
Julián Montes de Oca
ecb5e7ffae
Video Widget: Support on More Platforms (#867)
* Add support for Video widget on WASM

* Add support for Video widget on Linux

* Linux video:  GStreamer appsink pipeline, GL texture upload, accurate seeking

* Add support for Video widget on Windows

* Harden cross-platform video playback and error handling

* Cleanup video playback logs

* Restore wasm builds

* Restore linux builds

* Restore linux builds

* Remove unused import
2026-02-27 18:52:49 +01:00
Admin
8b6ccc0d85 centralised resource cache 2026-02-27 16:55:05 +01:00
offline-ant
e1d3653de2
iOS: app icons, fullscreen, iOS 15 support, GL texture fix, NSLog logging (#897)
Co-authored-by: ant <ant@offline.click>
2026-02-27 16:42:47 +01:00
offline-ant
af684756c9
Font optimization: reduce atlas 64MB→4MB, use static data for builtins (#898)
Co-authored-by: ant <ant@offline.click>
2026-02-27 16:39:38 +01:00
offline-ant
855f52f5cc
deduplicate script resources by file path (#899)
file_resource and crate_resource now check if a resource with the same
abs_path already exists before creating a new entry. Returns the existing
handle instead of reading the same file multiple times.

Before: 54 resource entries, same font files loaded up to 15 times each
(427MB of duplicate heap data). After: ~10 unique entries, each file
loaded once (~50MB).

Co-authored-by: ant <ant@offline.click>
2026-02-27 16:38:00 +01:00
offline-ant
fdc918a890
iOS: GL render bridge (EAGL+IOSurface) and ios build command (#894)
* iOS: add GL render bridge (EAGL+IOSurface), fix linking, fix warnings

- Add EaglRenderBridge for iOS (GLES 3.0 context sharing textures with
  Metal via IOSurface), mirroring macOS CglRenderBridge
- Add iOS GlRenderBridge inner field and Cx methods
  (create_gl_render_bridge, create_gl_render_bridge_texture, restore_gl_context)
- Widen IOSurface support from macos-only to macos/ios/tvos in apple_sys
  and metal.rs (CxOsTexture fields, update_shared_texture, etc.)
- Expose metal_device() accessor on IosApp
- Replace removed SSLSetEnableCertVerify with SSLSetSessionOption
  (kSSLSessionOptionBreakOnServerAuth) to fix iOS linker error
- Remove unused apple_util::* imports in ios.rs and ios_app.rs
- Fix iOS deployment target from 26.0 to 17.0 in cargo_makepad

* cargo-makepad: add apple ios build command, expose IosBuildResult fields

---------

Co-authored-by: ant <ant@offline.click>
2026-02-27 08:40:41 +01:00
Admin
04e4c51ab8 implicit io markers 2026-02-27 08:36:46 +01:00
offline-ant
8549e70668
gl_render_bridge: fix Android EGL wiring and reset GL state on restore (#889)
Fix EGL context initialization on Android to properly wire up the GL
render bridge display/context/surface.

Add GL state reset in restore_gl_context on Linux/Android to prevent
state leakage from external GL consumers (e.g. Servo) back into the
Makepad render pipeline.

Co-authored-by: ant <ant@offline.click>
2026-02-26 11:35:54 +01:00