From a0754ec339d6fbb56a230ee1ead972bf44754d68 Mon Sep 17 00:00:00 2001 From: Michael Schumacher Date: Wed, 11 Dec 2024 01:25:54 +0100 Subject: [PATCH] app/tests: Do not run ui window_roles test under Wayland window_roles uses GDK API which is know to not work on Wayland, and is declared unfixable in GTK 3. This change determines the session type via the XDG_SESSION_TYPE environment variable and only runs the test if it is not set to "wayland". Attempts to fix issue #12534. --- app/tests/test-ui.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/tests/test-ui.c b/app/tests/test-ui.c index 7bb02c75918..33858ab9f74 100644 --- a/app/tests/test-ui.c +++ b/app/tests/test-ui.c @@ -855,12 +855,15 @@ gimp_ui_switch_window_mode (Gimp *gimp) int main(int argc, char **argv) { - Gimp *gimp = NULL; - gint result = -1; + Gimp *gimp = NULL; + gint result = -1; + gchar *session_type; gimp_test_bail_if_no_display (); gtk_test_init (&argc, &argv, NULL); + session_type = g_getenv("XDG_SESSION_TYPE"); + gimp_test_utils_setup_menus_path (); /* Start up GIMP */ @@ -891,7 +894,10 @@ int main(int argc, char **argv) ADD_TEST (switch_back_to_multi_window_mode); ADD_TEST (close_image); ADD_TEST (repeatedly_switch_window_mode); - ADD_TEST (window_roles); + + if (g_strcmp0(session_type, "wayland") != 0) { + ADD_TEST (window_roles); + } /* Run the tests and return status */ g_application_run (gimp->app, 0, NULL); -- GitLab