Skip to content

I20241029-1800

@ptziegler ptziegler tagged this 29 Oct 20:26
The static initializer in OS is calling "gdk_display_get_default()" via
"isX11()" and therefore violates the requirement that
"gtk_init()"/"gtk_init_check()" must be invoked before any other GTK+
function. While doing so works in GTK3, it is by no means a documented
behavior, but rather something that works by pure chance [1].

With this change, the system property is moved from the initializer to
the Display constructor, where the init function is explicitly called.
The original change was made in response to an error being thrown while
executing the JUnit tests on Wayland [2]. But because the display is
created before those are executed, it should be safe to do so at either
places.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=465863
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=528968
Assets 2
Loading