Blob Blame History Raw
From a89835db96703a861c14cc36211511ecfcb7d3d6 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Wed, 11 Oct 2017 18:08:52 +0200
Subject: [PATCH 1/3] Revert "Revert "plugins: Work-around startup deadlock""

This reverts commit e0f230ce6124fac47bc0810d30ff78ec327152ca.
---
 configure.ac                         | 2 +-
 plugins/common/daemon-skeleton-gtk.h | 4 ++++
 plugins/common/daemon-skeleton.h     | 4 ++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c74ba250..3073017d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,7 @@ dnl ---------------------------------------------------------------------------
 dnl - Dependencies
 dnl ---------------------------------------------------------------------------
 
-GLIB_REQUIRED_VERSION=2.53.0
+GLIB_REQUIRED_VERSION=2.44.0
 GIO_REQUIRED_VERSION=${GLIB_REQUIRED_VERSION}
 GTK_REQUIRED_VERSION=3.15.3
 GCONF_REQUIRED_VERSION=2.6.1
diff --git a/plugins/common/daemon-skeleton-gtk.h b/plugins/common/daemon-skeleton-gtk.h
index 27aade6c..46d0ed1a 100644
--- a/plugins/common/daemon-skeleton-gtk.h
+++ b/plugins/common/daemon-skeleton-gtk.h
@@ -199,6 +199,10 @@ main (int argc, char **argv)
 
         set_empty_gtk_theme (TRUE);
 
+        /* Work around https://bugzilla.gnome.org/show_bug.cgi?id=674885 */
+        g_type_ensure (G_TYPE_DBUS_CONNECTION);
+        g_type_ensure (G_TYPE_DBUS_PROXY);
+
         gdk_set_allowed_backends ("x11");
 
         error = NULL;
diff --git a/plugins/common/daemon-skeleton.h b/plugins/common/daemon-skeleton.h
index e4641fcc..cdd7bc2a 100644
--- a/plugins/common/daemon-skeleton.h
+++ b/plugins/common/daemon-skeleton.h
@@ -174,6 +174,10 @@ main (int argc, char **argv)
         textdomain (GETTEXT_PACKAGE);
         setlocale (LC_ALL, "");
 
+        /* Work around https://bugzilla.gnome.org/show_bug.cgi?id=674885 */
+        g_type_ensure (G_TYPE_DBUS_CONNECTION);
+        g_type_ensure (G_TYPE_DBUS_PROXY);
+
         context = g_option_context_new (NULL);
         g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
         if (!g_option_context_parse (context, &argc, &argv, &error)) {
-- 
2.13.5