On Sun, 1 Nov 2026 18:28:35 GMT, Thiago Milczarek Sayao <[email protected]> 
wrote:

>> This is a continuation to 
>> [JDK-8236651](https://bugs.openjdk.org/browse/JDK-8236651) and it aims to 
>> stabilize the linux glass gtk backend.
>> 
>> It refactors the Glass GTK implementation with a primary focus on window 
>> sizing, positioning, and state management, addressing a number of 
>> long-standing issues.
>> 
>> Previously, three separate context classes existed, two of which were used 
>> for Java Web Start and Applets. These have been unified, as they are no 
>> longer required.
>> 
>> Additional tests have been introduced to improve coverage. Some tests 
>> produced different results depending on the StageStyle, so they have been 
>> converted to use `@ParameterizedTest` to exercise multiple styles.
>> 
>> Although the primary focus is XWayland, the changes have also been verified 
>> to work correctly on Xorg.
>> 
>> This replaces #1789. It removes the use of GdkWindow in favor of GtkWindow, 
>> reducing risk and simplifying the review process while preserving the same 
>> set of bug fixes. Additionally, #2025 requires a `GtkWindow` to be used when 
>> setting the parent of the file chooser dialog.
>> 
>> To show debug messages,  build with `-PCONF=DebugNative`  and run with 
>> `-Djdk.gtk.verbose=true`. Log categories can be passed with 
>> `-Dglass.gtk.logCategories=CATEGORY` 
>> 
>> `CATEGORY` can be one or more of:
>> - all
>> - size
>> - position
>> - focus
>> - state
>> - lifecycle
>> - input
>> - dialog
>> 
>> Multiple categories can be specified by separating them with commas (e.g. 
>> size,focus,input).
>> 
>> A manual test is provided:
>> `java @build/run.args tests/manual/stage/TestStage.java`
>> 
>> When a window property is set, it is reported immediately. However, once it 
>> reaches the native Glass layer, it may be adjusted or rejected, causing the 
>> property to be updated again. Introducing a delay helps ensure the final 
>> state has been applied before it is verified.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Thiago Milczarek Sayao has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   glass_window_ime.cpp: check for null jview
>   glass_window.h: review suggestions
>   glass_general.h: wrap log on a do {} while(0)

To easily verify the fixes, check out the test repository: 
https://github.com/tsayao/jfx-tester/

### 1. Run the regression test

Run the following command from the `jfx-tester` directory:


./JDK8354943Test.sh --source=<PATH_TO_JFX_SOURCE> --headless --build


Run the test first against `master` and then against this branch to compare the 
results and verify that the fix works as expected.

### 2. Run the system tests across different environments

You can also use `jfx-tester` to run the JavaFX `systemTests` suite across 
multiple Linux distributions and desktop environments:


jfx-tester \
  --source=$HOME/IdeaProjects/jfx \
  --distros=ubuntu:26.04,ubuntu:24.04,ubuntu:22.04,fedora:44 \
  --desktops=gnome,kde \
  --headless \
  --skip-webkit \
  --parallel \
  --yes


This command uses Toolbox containers to run the tests in isolated environments, 
covering the specified Linux distributions and both GNOME and KDE.

The `--headless` option allows the tests to run without requiring a manually 
configured graphical session, while `--skip-webkit` skips WebKit-related tests. 
The `--parallel` option enables parallel execution, and `--yes` automatically 
confirms prompts.

This makes it easier to reproduce issues and verify fixes across different 
Linux environments without having to install each distribution or desktop 
environment directly on your machine.

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

PR Comment: https://git.openjdk.org/jfx/pull/2139#issuecomment-6569374666

Reply via email to