Files
solidcraft/vendor
JIJINBEIandClaude Opus 5.5 16f3b939b3 Update egui/eframe to 0.37 (#9933)
* Update egui/eframe to 0.37 (WIP)

egui, eframe and egui-wgpu 0.36 -> 0.37. SolidCraft's egui-wgpu patch is
rebased onto 0.37.0; the vendored accesskit_macos is dropped (0.27.2 has
the #7535 fix).

Not finished: 36 solidcraft-ui-egui lib tests fail, and the full lib run
crashes with SIGSEGV when tests run in parallel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tests: clear texture deltas that egui 0.37 refuses to drop

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drop non-finite pointer input before egui; keep test time monotonic

egui 0.37 debug-asserts on NaN wheel deltas, on time moving backwards in the
pointer history, and on add_space inside a Grid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Hold a click that follows typing in the same frame until the next frame

egui 0.37 drops a field's focus on a click elsewhere when the field first
reads its style, before it reads the frame's typing, so text typed in the
frame of a click was lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Name a document tab's close button "Close tab"

egui 0.37 names an unnamed widget after its tooltip, so the tab's × became a
second control named Close beside a dialog's. The space mouse guard test now
clicks where each button was: by name it found nothing behind the guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Turn on egui's default_fonts: 0.37 no longer does

The built-in Hack is the UI's symbol fallback (#2955). The app got it through
eframe, but solidcraft-ui-egui on its own (its tests) did not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Text menu: act on the selection the menu click took the focus from

egui 0.37 drops a field's focus on a click elsewhere before the field draws,
and an unfocused field loses its selection, so Copy, Cut and Paste from the
right-click menu saw no selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Placement field: keep its native height under egui 0.37's interact floor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tests: pin the theme's 2/3 point radii; measure Japanese ribbon labels with a Japanese face

egui 0.37 rounds widgets 4 points by default, which the theme deliberately
does not follow. The ribbon test measured Japanese with missing glyphs, whose
width changed in 0.37; with BIZ UDPGothic, 駆動 wraps after its particle like
変換 does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tests: click the render inspector's Perspective checkbox by position

egui 0.37 orders the accessibility tree differently, so the name found the
stage's Perspective segment first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Translate "Close tab" for the complete catalogs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Point the focus workarounds at emilk/egui#8763

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Cargo.lock: update only what egui 0.37 needs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Web: Id::new -> Id::unique for the wasm-only windows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Command search: keep its hint centred under egui 0.37's interact floor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* egui 0.37 renames in code main added since the branch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* egui 0.37 renames in code main added since the last rebase

Id::new to Id::unique, ui.id() to ui.scope_id(), WidgetType to Role, the
wheel events' source, and the button stroke read from the widget visuals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Review: disclosures report expanded, late screenshots drained, chat width reset on both sides

A disclosure's node says whether it is open as expanded, as egui's own
collapsing header does. The screenshot channel is drained every frame, so a
shot whose request was cancelled is dropped. Resetting the chat panel's width
forgets both sides' state, as before 0.37, and the request stays with its
window when tabs switch. Tests main added since the last rebase clear their
texture deltas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 10:31:50 +00:00
..
2026-11-05 10:31:50 +00:00

Vendored third-party crates

Copies of third-party crates that SolidCraft builds with local fixes, wired in with [patch.crates-io] in the workspace Cargo.toml. They keep their own licence; changed lines are marked SolidCraft: in the source.

egui-wgpu 0.37.0 (MIT OR Apache-2.0, Emil Ernerfeldt and contributors)

Original package sources from https://github.com/emilk/egui/tree/0.37.0/crates/egui-wgpu, with both original licence texts retained. No images or bundled documentation are copied.

SolidCraft changes:

  • src/setup.rs, src/lib.rs: let a named adapter selector defer to the normal wgpu request when the requested card is unavailable or incompatible with the window surface.
  • src/lib.rs: use 1x MSAA on the selected OpenGL adapter before creating pipelines, exposing the effective sample count so host paint callbacks can match it.
  • src/winit.rs: use that same effective count for depth and resolve attachments.
  • src/renderer.rs: when the GPU refuses a staging buffer for a frame's meshes (device lost or out of memory), log a warning and draw nothing that frame instead of panicking (#1469).
  • Other backends retain requested MSAA, without another adapter or device probe.
  • src/lib.rs: clamp MSAA to the largest sample count the device supports for the surface and depth formats (supported_msaa_samples, RenderState::msaa_supported): a saved 8x on a device without it failed pipeline validation, a panic at start.
  • src/setup.rs: the default device requests TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES when the adapter has it, so 2x and 8x work where the adapter supports them (WebGPU only guarantees 1x and 4x).
  • src/setup.rs: the default device asks for the adapter's largest 2D texture (at least 8192) instead of exactly 8192.
  • src/lib.rs, src/winit.rs: set_startup_hook is told before each step of getting the device and the window's surface up (instance, surface, adapter request, the chosen adapter, device, renderer, surface configure, first present), so the app's crash journal can say which step a crash inside the graphics driver happened in.
  • src/lib.rs, src/winit.rs: a window larger than the device's largest texture gets a surface clamped to it (clamp_surface_extent, aspect ratio kept) and egui is drawn at the matching smaller scale, instead of a Surface::configure validation panic (#869). The resize path and an unsupported surface no longer unwrap.
  • src/winit.rs: acquire a drawable before preparing paint callbacks, so a skipped surface frame cannot discard initialization commands for cached viewport meshes.
  • src/lib.rs, src/winit.rs: surfaces are configured under capture_errors (error scopes): a configuration the device refuses (D3D12 "Failed to wait for GPU to come idle before reconfiguring the Surface", #1935) is logged, the frame is skipped and the configure is tried again, instead of the device's uncaptured-error handler panicking. A streak of refusals warns once (debug after), waits 16 ms doubling up to 1 s between tries and recreates the surface every SURFACE_RECREATE_AFTER refusals (ConfigureRetry). Each surface keeps the deadline of its next try: until it is due, no configure or recreate happens, whether the repaint comes from input, an animation, a resize (its size is kept for the retry) or an outdated surface, and the frame is skipped with a repaint asked for when it is due. The streak and the deadline survive a recreate; a configure the device takes ends the streak, a recreate it asked for included. A recreate for a lost surface goes ahead as before.
  • src/lib.rs, src/winit.rs: a window other than the main one (an immediate viewport, drawn and presented inside the main window's frame) is configured with Mailbox, else Immediate, when the configured mode waits for vsync and the surface offers one (viewport_present_mode). Waiting on both surfaces in one frame halved the frame rate, and on Wayland a window the compositor wasn't showing stalled the main window behind its present.
  • src/lib.rs, src/winit.rs: the device's lost callback marks RenderState::device_lost (DeviceLost), and the painter draws nothing on a lost device. Before a frame's uploads it submits a command buffer holding a debug marker (DeviceLost::probe), so a device the driver lost is found by opening that command list rather than by the first queue write, which panicked inside wgpu-core (PendingWrites::activate, #4172). An empty submission only signalled a fence, which a reset D3D12 device let through (#6528). A reset that lands after the probe is still met by a queue write or the present: the painter runs the frame under DeviceLost::survive, which takes that panic for the loss once the probe then finds the device lost, and lets any other panic carry on (#10240).
  • src/lib.rs, src/winit.rs: a surface configure that meets a lost device is not taken as configured (configure_captured): wgpu reports device-loss errors to no error scope, and on D3D12 a driver reset found by the configure has already dropped the surface's configuration. The next acquire failed with "Surface is not configured for presentation" and the device's default handler panicked (#7007). An unsupported surface is a refused configure too. The acquire runs under capture_errors, and the Validation status it then returns reconfigures the surface instead of skipping every later frame.
  • src/lib.rs, src/winit.rs: the painter holds an acquired frame as AcquiredFrame, which destroys a second handle to the frame's texture once the frame is presented or dropped. On a lost device wgpu's present and discard keep the frame's image in the surface, and dropping the surface (the window closing for the restart) then panicked in wgpu-hal ("Trying to destroy a SwapchainAcquireSemaphore that is still in use by a SurfaceTexture", #7148); the destroy takes the image back whatever the device's state.
  • src/lib.rs: creation of the egui renderer uses validation, internal and out-of-memory error scopes, awaiting every result before returning it. A refused UI pipeline (D3D12 egui_pipeline shader compilation, #6648) returns WgpuError::CreateRendererError through eframe so startup can retry another backend instead of invoking wgpu's panic handler.

winit 0.30.13 (Apache-2.0, © The winit contributors, https://github.com/rust-windowing/winit)

Original package sources from the 0.30.13 release, with the upstream licence retained. Example and test targets are dropped (their sources are not vendored); the new gesture module's unit tests stay in src/platform_impl/linux/wayland/seat/pointer/pointer_gesture.rs (cargo test -p winit --lib -- pointer_gesture).

SolidCraft changes:

  • src/platform_impl/linux/wayland/seat/pointer/pointer_gesture.rs (new): bind zwp_pointer_gestures_v1 (versions 1..=3) when the compositor has it, create one pinch gesture object per pointer and destroy it before the pointer is released, and turn begin/update/end into WindowEvent::PinchGesture and WindowEvent::RotationGesture for the window the gesture began over. Two fingers only; the protocol's scale is relative to the gesture's beginning, so the event carries the change since the previous update; rotation is negated to winit's counterclockwise degrees; a non-finite scale is dropped, and so are updates of a gesture whose begin we never saw; surfaces that are not one of our windows (decorations, subsurfaces, other clients) do not take part. Backport of the gesture part of rust-windowing/winit#4338 (winit 0.31's Wayland gesture support; the 0.30 backport rust-windowing/winit#4778 was closed unmerged). A trackpad pinch otherwise produces no input at all on Wayland: egui-winit already maps PinchGesture to egui::Event::Zoom, and navigation::handle already zooms the camera from that, so the Wayland backend is the only missing piece. eframe 0.37 requires winit 0.30, so this cannot come from a newer winit.
  • src/platform_impl/linux/wayland/seat/mod.rs, state.rs, seat/pointer/mod.rs: the global bound with the connection, the gesture object of each seat's pointer, and the module wiring.
  • Cargo.toml: enable the unstable feature of wayland-protocols on the Linux dependency (the wp::pointer_gestures module); drop the example and test targets.
  • src/event.rs, src/changelog/unreleased.md: the platform notes of both events and the changelog entry.