On Thu, 8 Jan 2026 17:09:25 GMT, Andy Goryachev <[email protected]> wrote:

>> Michael Strauß has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains 20 additional 
>> commits since the last revision:
>> 
>>  - move-modal message loop
>>  - Merge branch 'master' into headerbar-update
>>  - update copyright year to 2026
>>  - use native constants
>>  - typo
>>  - align Linux/Windows behavior when clicking on resize border
>>  - documentation
>>  - Unspecified HeaderDragType is behind top resize border
>>  - documentation
>>  - documentation
>>  - ... and 10 more: https://git.openjdk.org/jfx/compare/fe76b5e9...7a18278f
>
> modules/javafx.graphics/src/main/native-glass/win/GlassWindow.cpp line 689:
> 
>> 687:         // We don't consume this message, so it will be handled as 
>> usual in HandleViewMouseEvent()
>> 688:         // to generate a normal JavaFX event. Note that 
>> HandleViewMouseEvent() calls SetCapture().
>> 689:         case WM_LBUTTONDOWN:
> 
> Do we need to handle any other mouse events here (wheel, horizontal scroll, 
> etc)?
> 
> I do see the horizontal scroll happening in the client area outside of the 
> header bar when I first click and hold the left mouse button inside the 
> header bar text field (i.e. inside a drag event), but this behavior is 
> exhibited elsewhere.

You _should_ see mouse events not related to the press-drag-release gesture.

However, I've changed a tiny detail: when you press the left mouse button on 
the title bar and then move the cursor, you'll get a small number of 
`MOUSE_DRAGGED` events until the cursor leaves the "dead zone" and the 
move-modal loop starts. Once the move-modal loop has started, you won't receive 
events related to the window drag gesture.

I think that the few drag events at the beginning of a PDR gesture are just 
noise, therefore I've changed it so that from the perspective of the 
application, a PDR gesture on the title bar only produces `MOUSE_PRESSED` 
followed by `MOUSE_RELEASED`, but no drag events in-between.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1936#discussion_r2673496056

Reply via email to