[gnome-control-center] shell: Fix cheese related crashers
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] shell: Fix cheese related crashers
- Date: Fri, 17 Feb 2012 11:49:27 +0000 (UTC)
commit 74f29490225a59ce5a0b0f94b2c27ada5cdf1cc3
Author: Bastien Nocera <hadess hadess net>
Date: Fri Feb 17 12:46:45 2012 +0100
shell: Fix cheese related crashers
By initialising threading in X11. It's like Totem 10 years ago
(except that libXi doesn't deadlock).
https://bugzilla.gnome.org/show_bug.cgi?id=669834
configure.ac | 2 +-
shell/control-center.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index eddf6c9..633e4de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,7 @@ COMMON_MODULES="gtk+-3.0 >= $GTK_REQUIRED_VERSION
PKG_CHECK_MODULES(LIBGNOME_CONTROL_CENTER, $COMMON_MODULES)
PKG_CHECK_MODULES(LIBLANGUAGE, $COMMON_MODULES gnome-desktop-3.0 fontconfig)
PKG_CHECK_MODULES(LIBSHORTCUTS, $COMMON_MODULES x11)
-PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0)
+PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0 x11)
PKG_CHECK_MODULES(BACKGROUND_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0
gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES
diff --git a/shell/control-center.c b/shell/control-center.c
index 8e4621c..d2fc61d 100644
--- a/shell/control-center.c
+++ b/shell/control-center.c
@@ -30,6 +30,10 @@
#include <string.h>
#include <libnotify/notify.h>
+#ifdef GDK_WINDOWING_X11
+#include <X11/Xlib.h>
+#endif
+
#include "cc-shell-log.h"
G_GNUC_NORETURN static gboolean
@@ -179,6 +183,10 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#ifdef GDK_WINDOWING_X11
+ XInitThreads ();
+#endif
+
gtk_init (&argc, &argv);
cc_shell_log_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]