[cheese] Lock gdk mutex in photo-taken callback



commit 5dd78f6ff89b41ce21e0492cf581c337a805d7ad
Author: Filippo Argiolas <filippo argiolas gmail com>
Date:   Fri Jan 15 19:04:20 2010 +0100

    Lock gdk mutex in photo-taken callback
    
    Photo taken callback is called from the camera thread, hence each gtk call
    should be protected by gdk_threads_enter and _leave calls.
    Hopefully fixes bug 606759.

 libcheese/cheese-avatar-chooser.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libcheese/cheese-avatar-chooser.c b/libcheese/cheese-avatar-chooser.c
index 90dfcbe..900fbcb 100644
--- a/libcheese/cheese-avatar-chooser.c
+++ b/libcheese/cheese-avatar-chooser.c
@@ -72,6 +72,8 @@ cheese_widget_photo_taken_cb (CheeseCamera        *camera,
   CheeseAvatarChooserPrivate *priv = CHEESE_AVATAR_CHOOSER_GET_PRIVATE (chooser);
   GtkAllocation               allocation;
 
+  gdk_threads_enter ();
+
   gtk_widget_get_allocation (priv->camera, &allocation);
   gtk_widget_set_size_request (priv->image, allocation.width, allocation.height);
 
@@ -81,6 +83,8 @@ cheese_widget_photo_taken_cb (CheeseCamera        *camera,
                                      GTK_RESPONSE_ACCEPT,
                                      TRUE);
 
+  gdk_threads_leave ();
+
   g_object_notify (G_OBJECT (chooser), "pixbuf");
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]