Slide the notch along its edge with Alt+drag, as the Mac's ⌥-drag does - #276
Merged
Merged
Conversation
A plain press on the pill plus 4 px of movement dragged the window anywhere, and letting go snapped it to the nearest edge of whichever monitor it was over, saving one position that every edge shared. Since vinzdg#244 a click on a ring refreshes it, so a click that slipped moved the notch instead (vinzdg#251); and since vinzdg#246 the move handle exists to change edge, so the drag was doing its job too. The drag now needs Alt held, and without it every press on the pill is a click. It follows the pointer along the edge the notch is on and nowhere else, inside the work area, and never changes edge: the move handle and the Edge picker in Settings do that. It is the Mac's ⌥-drag (NotchWindowController.dragged), which only ever moves alongOffset. Each edge now remembers its own place, as the Mac keeps notchOffset per edge. A move to another edge lands where the notch was last left on that edge, centred if it has never been slid along it, and Recentre centres only the edge it is on. A carry used to land centred on purpose, because every edge shared one position and a carry dragged the old edge's fraction along with it; with a place per edge that reason has gone. The place is kept as a fraction of the edge rather than the Mac's points, so an existing notch_y becomes the place for the edge it was saved on without needing a screen to convert it, and a change of resolution keeps the notch in the same part of the edge. notch_y is read once and never written again. One thing is lost: dragging no longer takes the notch to another monitor. The Screen picker in Settings does, as on the Mac, and its caption no longer claims the drag can. The drag hint is rewritten in the Mac's own words, with its ru, zh-Hans, zh-Hant, ja and uk translations taken from Localizable.xcstrings and ⌥ read as Alt; the Mac has no Korean, so that sentence is new. The Ukrainian hint had been keyed to an older English sentence and never showed; it does now.
This was referenced Sep 19, 2026
vinzdg
added a commit
that referenced
this pull request
Sep 20, 2026
Two of the English sources were reworded by #276 after this branch was written: the screen hint lost its second sentence, and the pill-drag hint was replaced by the Alt-drag one, which Russian already carries. Re-pointed the first and dropped the second so neither falls back to English. Thanks @unchase.
Owner
|
Merged as One thing for a later tidy, not a problem: |
This was referenced Sep 20, 2026
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.
This takes the first option in #251: full parity with the Mac's ⌥-drag.
What changes. The drag now needs Alt held; without it every press on the pill is a click, so a click on a ring that slips refreshes it instead of carrying the notch off. With Alt, the notch follows the pointer along the edge it is on and nowhere else, inside the work area, and never changes edge — the move handle from #246 and the Edge picker in Settings do that. It is
NotchWindowController.draggedon the Mac, which only ever movesalongOffset.Each edge remembers its own place, as the Mac keeps
notchOffset.<edge>. A move to another edge lands where the notch was last left there, centred if it has never been slid along it, and Recentre centres only the edge it is on. A carry used to land centred on purpose, because every edge shared one position and a carry dragged the old edge's fraction along; with a place per edge that reason is gone.The place is stored as a fraction of the edge rather than the Mac's points (
notch_along, 0.5 = centred). That lets an existingnotch_ybecome the place for the edge it was saved on without a screen to convert it, and keeps the notch in the same part of the edge across a resolution change.notch_yis read once and never written back.One thing is lost, and it is worth saying plainly: dragging no longer takes the notch to another monitor. The Screen picker in Settings does, as on the Mac, and its caption no longer claims the drag can.
Settings text. The drag hint is the Mac's own sentence — "Hold ⌥ and drag the notch to slide it along its edge. Each edge remembers where you left it." — with its ru, zh-Hans, zh-Hant, ja and uk translations taken from
Localizable.xcstrings, ⌥ read as Alt. The Mac has no Korean, so that sentence is new and worth a native eye. The Ukrainian hint had been keyed to an older English sentence and never showed; it does now.Testing:
cargo test103 pass, 0 fail, 2 ignored — four new: each edge keeps its own place, the old position migrates to the edge it was on,notch_yis never written back, and a slid notch lands exactly where it was let go (along_atinvertsedge_origin). Clippy unchanged. All three pages parse.Checked by hand on Windows 11: a plain press or a slipped click on a ring never moves the notch and still refreshes it; Alt+drag slides it along its current edge only and stops at the ends of the work area; a notch slid along one edge and carried to another lands centred there, and returns to where it was left when carried back; Recentre centres only the edge it is on; and the drag hint and Screen caption read the new wording.
Overlaps. #269 moves this code to
desktop/and rewritesdrag_beginaroundplatform::drag_slides_along_edge(), so one of the two will need rebasing onto the other; its Linux drag already slides along the edge, so the intent is the same. #274 adds a Russian translation for the Screen caption this shortens, so whichever lands second needs to re-key that one string. #239, #257 and #210 also touchmain.rs, in other functions.Closes #251