8244088: [Regression] Switch of Gnome theme ends up in deadlocked UI
Reviewed-by: serb
This commit is contained in:
parent
bd3e65b576
commit
a7f46919ff
src/java.desktop/unix/native/libawt_xawt/awt
@ -708,7 +708,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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -401,7 +401,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);
|
||||
|
@ -350,10 +350,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();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user