Skip to content
Permalink
Browse files
8244088: [Regression] Switch of Gnome theme ends up in deadlocked UI
Backport-of: a7f46919ff43ede12ed977512a3b0d93bc4cbc76
  • Loading branch information
Yuri Nesterenko committed May 5, 2021
1 parent 547c798 commit 5626db38fe39dd43b46d9f28d792a73a075188d3
@@ -703,7 +703,7 @@ static int gtk3_unload()
*/
static void flush_gtk_event_loop()
{
while((*fp_g_main_context_iteration)(NULL));
while((*fp_g_main_context_iteration)(NULL, FALSE));
}

/*
@@ -396,7 +396,7 @@ static void (*fp_g_object_set)(gpointer object,
const gchar *first_property_name,
...);

static gboolean (*fp_g_main_context_iteration)(GMainContext *context);
static gboolean (*fp_g_main_context_iteration)(GMainContext *context, gboolean may_block);
static gboolean (*fp_g_str_has_prefix)(const gchar *str, const gchar *prefix);
static gchar** (*fp_g_strsplit)(const gchar *string, const gchar *delimiter,
gint max_tokens);
@@ -346,10 +346,8 @@ Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting(
JNIEXPORT void JNICALL Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme(
JNIEnv *env, jobject this)
{
// Note that flush_gtk_event_loop takes care of locks (7053002)
gtk->gdk_threads_enter();
// Note that gtk->flush_event_loop takes care of locks (7053002), gdk_threads_enter/gdk_threads_leave should not be used.
gtk->flush_event_loop();
gtk->gdk_threads_leave();
}

/*

1 comment on commit 5626db3

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 5626db3 May 5, 2021

Please sign in to comment.