Repository navigation
1.18 - Backport token drag fix from 1.19 - #6057
Merged
kwvanderlinde merged 4 commits intoOct 6, 2026
Merged
kwvanderlinde merged 4 commits into
kwvanderlinde merged 4 commits into
Conversation
Previously, this would use whatever happened to be the last detected mouse press was, which is not necessarily meaningful. This applies equally to PointerTool and StampTool
…e being passed back to the Swing thread
cwisniew
approved these changes
Oct 6, 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.
Identify the Bug or Feature request
Fixes #5901 in 1.18
Description of the Change
Fixes the underlying problem with mouse event delivery from overlays so that mouse events are delivered in the same order they were received. For those events that don't require hit detection, we still send them through the JavaFX thread and back to the Swing thread to preserve the timing. With this fixed, there is no more need for the workaround regarding map dragging introduced back in 9f454c3, so
HTMLOverlayPanel#mayStartMapDrag()has been removed.A minor related issue in
PointerToolandStampToolchanges the context-menu's Move action to follow the token drag anchor rather than whatever point happened to be last pressed before the context menu opened.Possible Drawbacks
PointerToolandStampToolstill have weakness in terms ofmousePressed()vsmouseDragged()event ordering. But, by a stroke of luck, it doesn't seem possible or at least easy to run afoul of these weaknesses, at least not without the significantly delayedmousePressed()events fixed in this PR. These tools ought to still be refactored in a future change so that they rely less on share state directly betweenmousePressed()andmouseDragged().Documentation Notes
N/A
Release Notes
This change is