Integrate macOS window controls and fix palette text rendering
Center native window controls in the draggable tab bar. Preserve full text runs during GPUI layout and let AppKit compose text in palette and rename fields.
This commit is contained in:
Vendored
+19
-6
@@ -1,8 +1,9 @@
|
||||
# GPUI 0.2.2 Wayland idle redraw patch
|
||||
# Local GPUI 0.2.2 patches
|
||||
|
||||
This directory vendors the published `gpui` 0.2.2 crate unchanged except for
|
||||
`src/window.rs`, `src/app.rs`, and this note. Upstream source and Apache-2.0
|
||||
license are retained; see `LICENSE-APACHE` and `.cargo_vcs_info.json`.
|
||||
This directory vendors the published `gpui` 0.2.2 crate with the patches below.
|
||||
The upstream license and revision are in `LICENSE-APACHE` and `.cargo_vcs_info.json`.
|
||||
|
||||
## Wayland idle redraw
|
||||
|
||||
Wayland compositors can withhold a pending frame callback after GPUI skips
|
||||
presenting a clean frame. Later asynchronous view notifications make the scene
|
||||
@@ -14,9 +15,21 @@ of an app effect cycle, an invalidated idle window draws and presents once,
|
||||
clearing the idle flag. Normal compositor callbacks then resume. Dirty active
|
||||
windows remain callback-paced; clean idle windows submit no frames. The flag
|
||||
starts false, avoiding presentation before the initial Wayland configure.
|
||||
Other platform backends are unchanged. No foreign Wayland connection or raw
|
||||
surface manipulation is used.
|
||||
|
||||
The optional `scripts/check-wayland-idle.py` exercises an actual headless Weston
|
||||
window and verifies output repaints after an idle interval without pointer
|
||||
input or screenshots waking the compositor.
|
||||
|
||||
## macOS titlebar dragging
|
||||
|
||||
The macOS implementation of `start_window_move` passes the current mouse
|
||||
event to AppKit's `performWindowDragWithEvent:`. This lets applications
|
||||
initiate native dragging from a custom titlebar. The implementation follows
|
||||
[upstream GPUI](https://github.com/zed-industries/zed/blob/main/crates/gpui_macos/src/window.rs).
|
||||
|
||||
## Text truncation during layout
|
||||
|
||||
Flex layout can measure a label at a narrow width before allocating its final
|
||||
width. Each truncation now starts from the original styled text runs, and the
|
||||
measurement cache includes the width used for truncation. This preserves the
|
||||
full command titles in the palette when there is room to display them.
|
||||
|
||||
Reference in New Issue
Block a user