This PR fixes event dispatch between a header button overlay and application content. The problem can be seen when an application button is placed next to the minimize button. Then, moving the cursor from the application button to the minimize button doesn't clear the hover state of the application button, because the scene doesn't receive an EXIT event.
The solution requires tracking who owns the cursor (the header button overlay or the application content), and then dispatching events correctly, including ENTER/EXIT. It also requires correctly tracking press-drag-release gestures, which capture the cursor. For application content, the Scene tracks PDR gestures, but we need the same mechanism in Glass, where we can decide whether to dispatch events to the application or to the overlay. The new class `HeaderButtonEventRouter` encapsulates that dispatch logic. I've also added several robot tests that exercise the new code with actual mouse events. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - fix event routing with HeaderButtonOverlay Changes: https://git.openjdk.org/jfx/pull/2370/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2370&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8387727 Stats: 875 lines in 8 files changed: 841 ins; 28 del; 6 mod Patch: https://git.openjdk.org/jfx/pull/2370.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2370/head:pull/2370 PR: https://git.openjdk.org/jfx/pull/2370
