[pitivi] application/viewer: Use GDK lock when getting/settings XID.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] application/viewer: Use GDK lock when getting/settings XID.
- Date: Sat, 5 Sep 2009 15:20:42 +0000 (UTC)
commit 34b82b70183354fcb97e44e04f8ebca842426090
Author: Edward Hervey <bilboed bilboed com>
Date: Sat Sep 5 16:09:45 2009 +0200
application/viewer: Use GDK lock when getting/settings XID.
so yes... not only do you need to use gobject.threads_init(), but also
gtk.gdk.threads_init() and gtk.gdk.threads_{enter|leave}.
pyg* devs hate multi-threaded app developers it seems... or are scared of them.
pitivi/application.py | 1 +
pitivi/ui/viewer.py | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index 98c0bea..eb9166d 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -26,6 +26,7 @@ Main application
import gobject
gobject.threads_init()
import gtk
+gtk.gdk.threads_init()
from optparse import OptionParser
import os
import sys
diff --git a/pitivi/ui/viewer.py b/pitivi/ui/viewer.py
index 62f642a..95dc423 100644
--- a/pitivi/ui/viewer.py
+++ b/pitivi/ui/viewer.py
@@ -23,6 +23,7 @@
import gobject
import gtk
from gtk import gdk
+gdk.threads_init()
import gst
from pitivi.action import ViewAction
@@ -476,7 +477,9 @@ class ViewerWidget(gtk.DrawingArea, Loggable):
self.log("...")
if self.have_set_xid:
return
+ gtk.gdk.threads_enter()
self.action.set_window_xid(self.window.xid)
+ gtk.gdk.threads_leave()
self.unset_flags(gtk.DOUBLE_BUFFERED)
self.have_set_xid = True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]