-
Notifications
You must be signed in to change notification settings - Fork 109
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
Pieces drop through to window beneath #12480
Comments
A minimal demo module for Vassal v3.7: CCNdragBugDemo.zip The demo manifests the issue in two modes, depending on the role you choose: "
|
Also reported here: https://forum.vassalengine.org/t/counters-disappearing-on-linux/77662 |
Examining the manifestation of this issue in Commands & Colors: Napoleonics within PieceMove.java, I observe two particular cases that occur when a card is dragged from a deck on the Main Map to an overlying Player Hand window ("Allies Hand"). In the first form, the underlying map ("Main Map") is pointed to by "map" and that is where the piece ends up. In the second form, the "map" variable points to the overlying - "Allies Hand" as expected - even up to the point of the snapTo() method being completed. However, the piece may still end up on Main Map. In other cases where the map variable points to Allies Hand, it ends up there as intended. |
Monitoring map before and after performDrop(), it is either both "Main Map" (the underlying window) or "Allies Hand" (the target, overlying window). I notice that if I turn on the Vassal Debug window to display the cursor's X/Y coordinates, the cursor gives me the Player Hand's offset X/Y, when positioned over that window. However, if I am dragging a card, the offset displayed continues to relate to the main map. |
Through debug output to monitor calls to performDrop(), it seems that some drops are intercepted first by the Main Map, whereupon the card is dropped there. Once this happens a subsequent performDrop call when the map is set to "Allies Hand" has no effect. |
Further investigation demonstrated that the underlying issue is not related to map overlays but rather to a synthetic (?) event - one generated with a ClickCount of zero - that Vassal allows through to the mouseReleased() handler in PieceMover(). PR #13875 attempts to address this in canHandleEvent() by only allowing a ClickCount of 1 (before anything less than 2 was allowed). |
Hi, Just tried the
and I cannot reproduce the problem. Perhaps the observed bug is related to this bug in OpenJDK? I rolled back to JRE version 11.0.26, and still cannot reproduce the problem. My DPI is 96x96. I tried moving the VASSAL module main and hand windows, around, and also make the windows smaller, larger, zoom, etc. All to no avail - I cannot reproduce the bug. Yours, |
Observed in Vassal since v3.2.17 (at least). Demo on MacOS but occurs on other platforms, I believe.
May relate to #9517 but has different symptoms from the ones described in the associated replies on the original forum post.
The attached video demonstrates the issue as experienced in the case of dragging a card from a deck into a private window. The fault is seen in any of the Commands & Colors modules. To replicate the video, use the Commands & Colours: Medieval module. Open a scenario as Solitaire. Open a hand window and position it over the board, as shown in the video. Now drag cards from the draw deck into the window, attempting similar drop positions to those where the fault is trigger in the video.
To a point in the forum thread - this fault can be reproduced regardless of whether the top left hand corner of the private window is over a piece or not.
Fault as generally experienced by C&C module users (card draws 2 & 5 show the fault occurring):
https://github.com/vassalengine/vassal/assets/58135975/e8541cdd-2348-447d-9e4f-8bf5fba0b293
Further demo to follow.
The text was updated successfully, but these errors were encountered: