-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework DnD redux #4079
Open
valadaptive
wants to merge
10
commits into
rust-windowing:master
Choose a base branch
from
valadaptive:dnd-cursor-location-rebase
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rework DnD redux #4079
valadaptive
wants to merge
10
commits into
rust-windowing:master
from
valadaptive:dnd-cursor-location-rebase
Conversation
This file contains 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
(Original work at rust-windowing#2615; rebased by @valadaptive)
Fixes GTK drag-and-drop coords being offset by (-100, -100). The relevant spec says: > data.l[2] contains the coordinates of the mouse position relative > to the root window. https://www.freedesktop.org/wiki/Specifications/XDND/#xdndposition
valadaptive
force-pushed
the
dnd-cursor-location-rebase
branch
from
January 8, 2025 19:40
008f86a
to
aa18119
Compare
valadaptive
force-pushed
the
dnd-cursor-location-rebase
branch
from
January 8, 2025 19:42
aa18119
to
4f0819f
Compare
valadaptive
requested review from
notgull,
kchibisov and
madsmtm
as code owners
January 8, 2025 19:50
We also need to use `convertPoint_fromView` for coordinate conversion-- attempting to do it manually resulted in (0, 0) being the top-left of the window *including* decorations.
valadaptive
force-pushed
the
dnd-cursor-location-rebase
branch
2 times, most recently
from
January 9, 2025 19:24
1213c74
to
b6eba6b
Compare
It's what translate_coords takes anyway, so the extra precision is misleading if we're going to cast it to i16 everywhere it's used. We can also simplify the "unpacking" from the XdndPosition message--we can and should use the value of 16 as the shift instead of size_of::<c_short> * 2 or something like that, because the specification gives us the constant 16.
ProtocolObject is new in objc2, and lets us use the generated AppKit bindings instead of roughing it with `msg_send!`.
valadaptive
force-pushed
the
dnd-cursor-location-rebase
branch
from
January 9, 2025 19:26
b6eba6b
to
fe7132e
Compare
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 picks up from #2615, rebasing it atop the latest winit version and fixing a couple coordinate-space bugs. Part of #720.
changelog
module if knowledge of this change could be valuable to users