On Thu, 27 Aug 2026 12:38:43 GMT, Michael Strauß <[email protected]> wrote:

>> Thiago Milczarek Sayao has updated the pull request with a new target base 
>> due to a merge or a rebase. The pull request now contains 43 commits:
>> 
>>  - Merge branch 'master' into 8354943_v2
>>  - mapped = true for popups
>>  - Do not block sent configure events, as doing so breaks screen-change 
>> detection.
>>  - - Restore gdk_event_request_motions (it's needed even without event 
>> compression)
>>    - Remove cursor unref (it's aready de-referenced on gdk_window_set_cursor)
>>    - Improve XComposite message
>>  - Remove configurable delays
>>  - Fix test
>>  - Xorg fixes
>>  - Revert "Rewrite WrongStageFocusWithApplicationModalityTest because it 
>> fails intermittently"
>>    
>>    This reverts commit c6b9dd745e5d762adb89a3b596e53b0d8a790d7f.
>>  - Rewrite WrongStageFocusWithApplicationModalityTest because it fails 
>> intermittently
>>  - Use existing verbose flag for GTK
>>  - ... and 33 more: https://git.openjdk.org/jfx/compare/58a7bea2...969ed5f3
>
> modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp line 1261:
> 
>> 1259:     }
>> 1260: 
>> 1261:      gtk_window_set_geometry_hints(GTK_WINDOW(gtk_widget), nullptr, 
>> &hints, (GdkWindowHints) flags);
> 
> After queueing `gtk_window_resize()`, `move_resize()` calls this method. At 
> that moment `view_size` still contains the old configured size, so the code 
> reinstalls min == max == old size before GTK processes the queued resize.
> 
> Maybe the temporary removal should use a zero mask:
> 
> gtk_window_set_geometry_hints(
>     GTK_WINDOW(gtk_widget),
>     nullptr,
>     nullptr,
>     static_cast<GdkWindowHints>(0));
> 
> 
> The fixed constraints should then be reapplied after the corresponding 
> `GDK_CONFIGURE` updates `view_size`, not immediately after 
> `gtk_window_resize()`. Maybe a "pending programmatic resize" flag would make 
> that sequencing explicit.

The problem with waiting for a pending event is that it may never arrive, 
especially since there are different compositors/window managers, and some of 
them may not send the event.

I changed update_window_constraints to accept a size parameter, passing the 
same size that was provided to the resize operation. Since both the resize and 
the geometry hints are involved, it is possible that one succeeds while the 
other fails, but I think that is unlikely, and I couldn’t find a better 
solution.

I did the zero mask change.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2139#discussion_r3944706701

Reply via email to