fix(windows): resolve gpui windows build#3
Conversation
Disambiguate external util imports and avoid borrowing the renderer immutably while direct composition is mutably borrowed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Disabled knowledge base sources:
Summary by CodeRabbit
WalkthroughAdd Windows rounded-host-backdrop blur support and renderer APIs; wire blur updates into window sizing and events; move AccessKit Click handling into paint-time handler registration (synthesizing a keyboard ClickEvent) and remove Window-level Click synthesis; standardize a couple import paths and add an example and platform-specific rounded-blur implementations. ChangesWindows graphics maintenance & small optimizations
Windows rounded host-backdrop blur
Accessibility click handling (A11y)
Cross-platform rounded blur behavior and example
🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs:
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes a Windows build issue in the gpui_windows crate by resolving a Rust borrow-checker conflict in DirectXRenderer::update_retained_layer_cache and by disambiguating util::ResultExt imports to explicitly target the external util crate.
Changes:
- Prevents simultaneous mutable/immutable borrowing of
DirectXRendererby computingsupports_retained_layer_scene(scene)before mutably borrowingself.direct_composition. - Updates
ResultExtimports to::util::ResultExtin the touched modules to make the external-crate intent explicit and avoid name resolution ambiguity.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/gpui_windows/src/util.rs | Switches ResultExt import to ::util::ResultExt to explicitly reference the external util crate. |
| crates/gpui_windows/src/directx_renderer.rs | Fixes borrow-checker conflict by caching supports_retained_layer_scene(scene) before mutably borrowing direct_composition. |
| crates/gpui_windows/src/direct_manipulation.rs | Switches ResultExt import to ::util::ResultExt to explicitly reference the external util crate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sh support Implement HostBackdropBrush-style blur across Windows (WinComp), Linux (Wayland/kwin), and macOS (NSVisualEffectView) backends. Includes rounded_blur_overlay example demonstrating the feature.
This pull request makes minor code improvements to the
gpui_windowscrate, focusing on import style consistency and a small refactor for clarity. The changes do not affect functionality but improve code readability and maintainability.Codebase consistency and clarity:
ResultExtto use an absolute path (::util::ResultExt) in bothdirect_manipulation.rsandutil.rsfor consistency and to avoid ambiguity. [1] [2]DirectXRenderer::update_retained_layer_cacheindirectx_renderer.rsto store the result ofsupports_retained_layer_scene(scene)in a variable, improving readability and preventing duplicate function calls. [1] [2]Disambiguate external util imports and avoid borrowing the renderer immutably while direct composition is mutably borrowed.