[istanbul] Fix issue with crashing with X errors on save dialog.	Fixes bug #604938.
- From: Zaheer Abbas Merali <zaheerm src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [istanbul] Fix issue with crashing with X errors on save dialog.	Fixes bug #604938.
- Date: Sat, 20 Mar 2010 16:19:17 +0000 (UTC)
commit cf87de12facbf013d8df1ad33ac34d618b4db278
Author: Zaheer Merali <zaheermerali gmail com>
Date:   Sat Mar 20 17:18:11 2010 +0100
    Fix issue with crashing with X errors on save dialog.
    Fixes bug #604938.
 istanbul/main/gst_player.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/istanbul/main/gst_player.py b/istanbul/main/gst_player.py
index f992ff7..61a9ce1 100644
--- a/istanbul/main/gst_player.py
+++ b/istanbul/main/gst_player.py
@@ -49,8 +49,13 @@ class GstPlayer:
         if message.structure is None:
             return
         if message.structure.get_name() == 'prepare-xwindow-id':
+            # all this is needed to sync with the X server before giving the
+            # x id to the sink
+            gtk.gdk.threads_enter()
+            gtk.gdk.display_get_default().sync()
             self.videowidget.set_sink(message.src)
             message.src.set_property('force-aspect-ratio', True)
+            gtk.gdk.threads_leave()
             
     def on_message(self, bus, message):
         t = message.type
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]