aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/clutter/files/clutter-1.22.0-init-fixes.patch')
-rw-r--r--media-libs/clutter/files/clutter-1.22.0-init-fixes.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/media-libs/clutter/files/clutter-1.22.0-init-fixes.patch b/media-libs/clutter/files/clutter-1.22.0-init-fixes.patch
new file mode 100644
index 00000000..cc864521
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.22.0-init-fixes.patch
@@ -0,0 +1,43 @@
+From 438d739442be9e646caa2100942543301666074d Mon Sep 17 00:00:00 2001
+From: Matthieu Bouron <matthieu.bouron@collabora.com>
+Date: Tue, 12 May 2015 11:16:35 +0200
+Subject: [PATCH] clutter-backend-gdk: Only set setting on successful
+ gdk_screen_get_setting call
+
+It could happen that gdk_screen_get_setting fails to retreive
+Gdk/WindowScalingFactor which leads to the following warnings when
+clutter_init is called:
+
+GLib-GObject-WARNING **: value "0" of type 'gint' is invalid or out of range for property 'window-scaling-factor' of type 'gint'
+GLib-GObject-WARNING **: value "0" of type 'gint' is invalid or out of range for property 'dnd-drag-threshold' of type 'gint'
+---
+ clutter/gdk/clutter-backend-gdk.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/clutter/gdk/clutter-backend-gdk.c b/clutter/gdk/clutter-backend-gdk.c
+index b4f7f1c..1e67c07 100644
+--- a/clutter/gdk/clutter-backend-gdk.c
++++ b/clutter/gdk/clutter-backend-gdk.c
+@@ -94,12 +94,14 @@ clutter_backend_gdk_init_settings (ClutterBackendGdk *backend_gdk)
+ GValue val = G_VALUE_INIT;
+
+ g_value_init (&val, CLUTTER_SETTING_TYPE(i));
+- gdk_screen_get_setting (backend_gdk->screen,
++ if (gdk_screen_get_setting (backend_gdk->screen,
+ CLUTTER_SETTING_GDK_NAME(i),
+- &val);
+- clutter_settings_set_property_internal (settings,
+- CLUTTER_SETTING_PROPERTY (i),
+- &val);
++ &val))
++ {
++ clutter_settings_set_property_internal (settings,
++ CLUTTER_SETTING_PROPERTY (i),
++ &val);
++ }
+ g_value_unset (&val);
+ }
+ }
+--
+2.3.7
+