[pinpoint] Fix deadlock when switching speaker screen on/off
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pinpoint] Fix deadlock when switching speaker screen on/off
- Date: Tue, 15 Sep 2015 13:15:01 +0000 (UTC)
commit eb6b60118f4f008c68a7c63b5082196d8950490d
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Sun Sep 13 22:48:44 2015 +0200
Fix deadlock when switching speaker screen on/off
pp-clutter.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/pp-clutter.c b/pp-clutter.c
index 6aa87dd..9c7e3d2 100644
--- a/pp-clutter.c
+++ b/pp-clutter.c
@@ -1310,9 +1310,8 @@ static void end_of_presentation (ClutterRenderer *renderer)
toggle_autoadvance (NULL, NULL, renderer);
}
-
-static void
-toggle_speaker_screen (ClutterRenderer *renderer)
+static gboolean
+toggle_speaker_screen_internal (ClutterRenderer *renderer)
{
if (!renderer->speaker_window)
clutter_renderer_init_speaker_screen (renderer);
@@ -1326,6 +1325,18 @@ toggle_speaker_screen (ClutterRenderer *renderer)
renderer->speaker_mode = TRUE;
gtk_widget_show_all (renderer->speaker_window);
}
+ return FALSE;
+}
+
+static void
+toggle_speaker_screen (ClutterRenderer *renderer)
+{
+ /* Because of the complex interaction between Clutter & GTK+, we
+ * need to break out the event processing chain. This timeout ensure
+ * we don't process an event in each framework within the same
+ * call stack.
+ */
+ g_timeout_add (0, (GSourceFunc) toggle_speaker_screen_internal, renderer);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]