Skip to content

1.18 - Backport token drag fix from 1.19 - #6057

Merged
kwvanderlinde merged 4 commits into
RPTools:release-1.18from
kwvanderlinde:bugfix/5901-backport-to-1.18
Oct 6, 2026
Merged

kwvanderlinde merged 4 commits into
RPTools:release-1.18from
kwvanderlinde:bugfix/5901-backport-to-1.18

Conversation

@kwvanderlinde

@kwvanderlinde kwvanderlinde commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

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 PointerTool and StampTool changes 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

PointerTool and StampTool still have weakness in terms of mousePressed() vs mouseDragged() 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 delayed mousePressed() 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 between mousePressed() and mouseDragged().

Documentation Notes

N/A

Release Notes

  • Fixed a bug where having an overlay open would often cause tokens to jump randomly at the start of drags.

This change is Reviewable

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
@kwvanderlinde kwvanderlinde self-assigned this Oct 5, 2026
@github-actions github-actions Bot added the bug label Oct 5, 2026
@kwvanderlinde
kwvanderlinde merged commit 4316918 into RPTools:release-1.18 Oct 6, 2026
4 checks passed
@kwvanderlinde
kwvanderlinde deleted the bugfix/5901-backport-to-1.18 branch October 6, 2026 20:20
@kwvanderlinde kwvanderlinde linked an issue Oct 9, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

[Bug]: Tokens can jump at start of drag when using overlays

2 participants