On Mon, 23 Mar 2026 20:10:13 GMT, Michael Strauß <[email protected]> wrote:

>> Thiago Milczarek Sayao has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Add flag to disable portal file chooser
>
> modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp line 1270:
> 
>> 1268:     } else if (ch > 0) {
>> 1269:         // once set to window, stick with it
>> 1270:         if (width_type == BOUNDSTYPE_UNKNOWN) {
> 
> This should probably be `height_type`, not `width_type`.

Fixed.

> modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp line 1477:
> 
>> 1475: 
>> 1476:     if (max_size.width > 0 && newW > max_size.width) {
>> 1477:         boundsW = max_size.height - extents.width;
> 
> This should probably be `max_size.width`, not `max_size.height`.

Fixed

> modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp line 1638:
> 
>> 1636:     // Double-clicking on the drag area maximizes the window (or 
>> restores its size).
>> 1637:     if (is_resizable() && event->type == GDK_2BUTTON_PRESS) {
>> 1638:         jint hitTestResult = mainEnv->CallBooleanMethod(
> 
> You didn't change this, but here and in other places, 
> `jGtkWindowNonClientHitTest` is called with `CallBooleanMethod`, but the 
> method actually returns an `int`.

Fixed.

> modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp line 1691:
> 
>> 1689:     if (is_mouse_entered && event->type != GDK_ENTER_NOTIFY) {
>> 1690:         is_mouse_entered = false;
>> 1691:         mainEnv->CallVoidMethod(get_jview(), jViewNotifyMouse,
> 
> One thing to consider here: can `get_jview()` return null? In other places, 
> we check; here we don't. Same question for 
> `WindowContextExtended::process_mouse_motion()`.

I believe it can return `null` if there is no `Scene` attached (which should be 
a rare case). I've added the checks where it was missing.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1789#discussion_r2997787522
PR Review Comment: https://git.openjdk.org/jfx/pull/1789#discussion_r2997788335
PR Review Comment: https://git.openjdk.org/jfx/pull/1789#discussion_r2997785656
PR Review Comment: https://git.openjdk.org/jfx/pull/1789#discussion_r2997786380

Reply via email to