RFR: 8369836: Update HeaderBar API [v16]
Andy Goryachev
angorya at openjdk.org
Thu Jan 8 19:42:00 UTC 2026
On Thu, 8 Jan 2026 18:51:43 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> 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.
Could it have any impact on DnD to/from the header bar?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1936#discussion_r2673641408
More information about the openjfx-dev
mailing list