Repository navigation
racing: pinch must never die silently in AS plugin mode - #154
Merged
Merged
Conversation
JNI monitor swallowed every magnify event even when delivery failed (panel not in hierarchy, listeners empty, channel mid-install) and the echo timer was armed on un-consumed gestures, muting the ctrl+wheel fallback — pinch looked dead until a real ctrl+swipe re-armed macOS emulation. Now the monitor passes the event through when the JVM does not consume it (onMagnify returns boolean), the echo timer moves only on actual delivery, and the NSEvent monitor is retained (autoreleased monitor died with pool drain inside IntelliJ EDT — the "sometimes").
This branch was previously deployed
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.
Fixes the "pinch sometimes dead in Android Studio plugin mode until a ctrl+swipe revives it" bug.
Three compounding causes, all in the macOS pinch path:
addLocalMonitorForEventsMatchingMask:returns an autoreleased object; withoutretainthe monitor died on autorelease-pool drain. IntelliJ EDT drains the pool constantly, standalone AppKit runloop does not — that is why it was plugin-only and "sometimes".Changes:
onMagnifynow returns whether the gesture was consumed; the native monitor passes unconsumed events through to the regular dispatch (ctrl+wheel fallback).lastMagnifyMs(echo muting) advances only on actual delivery, in both JNI and eawt channels.(D)V→(D)Z.Local gate green:
:core:classes :app:classes :plugin:classes+:core:test --tests "...chart.racing.*".