patches/cheese-04-threads.diff
author trisk
Fri, 31 Aug 2007 00:07:24 +0000
changeset 432 3f9248505c0b
permissions -rw-r--r--
2007-08-30 Albert Lee <[email protected]> * SFEcheese.spec: *NEW* Cheese - GNOME application for taking pictures and videos from a webcam * SFEgnome-power-manager.spec: Add missing doc dir * SFEpostr.spec: *NEW* Postr - upload photographs to Flickr * patches/cheese-01-nongnu.diff: Fix GNU environment assumptions * patches/cheese-02-sunpro.diff: Studio compatibility * patches/cheese-03-flags.diff: Fix CFLAGS and LDFLAGS in build * patches/cheese-04-threads.diff: Add thread safety for GDK
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
432
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     1
--- cheese-0.2.3.orig/src/cheese.c	2007年  8月 17日 五 14:24:17
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     2
+++ cheese-0.2.3/src/cheese.c	2007年  8月 30日 四 19:27:18
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     3
@@ -58,6 +58,8 @@
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     4
   GnomeVFSURI *uri;
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     5
 
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     6
   g_thread_init (NULL);
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     7
+  gdk_threads_init ();
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     8
+  gdk_threads_enter ();
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     9
   gtk_init (&argc, &argv);
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    10
   gst_init (&argc, &argv);
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    11
   gnome_vfs_init ();
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    12
@@ -116,6 +118,7 @@
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    13
       G_CALLBACK (cheese_window_expose_cb), NULL);
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    14
 
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    15
   gtk_main ();
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    16
+  gdk_threads_leave ();
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    17
 
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    18
   return EXIT_SUCCESS;
3f9248505c0b 2007-08-30 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    19
 }