Repository navigation
Conversation
Two things moved the window on a drag in the search box: - The pill only sensed hover, and the text field is a short row inside it, so a press on the padding or the magnifier fell through to the top bar's drag surface. The whole pill now takes the press, and a click there focuses the field. - The macOS window keeps a native, hidden title bar with the content under it. AppKit moves the window on a press anywhere in that strip before egui sees the event. `chrome::NativeDrag` now sets the window's `movable` flag from egui's hit test each frame: native moving only where a press lands on nothing or on a drag surface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On macOS, drag-selecting text in the search bar moved the window.
Causes
main.rs). AppKit still moves the window on a press anywhere in that hidden strip, and it does so before egui sees the event. So it ignores the controls egui draws there, the search field included.Fix
ui/topbar.rs: the whole pill takes the press (click_and_drag), and a click or press there focuses the field.chrome::NativeDrag: each frame it sets the NSWindow'smovableflag from egui's hit test. Native moving is allowed only where a press lands on nothing or on adrag_surface; AppKit is only called when the value changes.drag_surfacerecords its ids so they can be told apart from the controls on top of them.Nothing changes on other platforms or with
--decorated.Testing
cargo clippy --all-targets,cargo fmtandcargo test --lib(684 passed) pass on macOS.