[clutter/clutter-1.22] clutter-backend-gdk: Only set setting on successful gdk_screen_get_setting call
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.22] clutter-backend-gdk: Only set setting on successful gdk_screen_get_setting call
- Date: Tue, 12 May 2015 10:17:00 +0000 (UTC)
commit 8189d3b904757db668ac01f1081936c198831e57
Author: Matthieu Bouron <matthieu bouron collabora com>
Date: Tue May 12 11:16:35 2015 +0200
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'
https://bugzilla.gnome.org/show_bug.cgi?id=749256
Slightly edited to fix up whitespace issues.
Edited-by: Emmanuele Bassi <ebassi gnome org>
clutter/gdk/clutter-backend-gdk.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/clutter/gdk/clutter-backend-gdk.c b/clutter/gdk/clutter-backend-gdk.c
index b4f7f1c..47bd671 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,
- CLUTTER_SETTING_GDK_NAME(i),
- &val);
- clutter_settings_set_property_internal (settings,
- CLUTTER_SETTING_PROPERTY (i),
- &val);
+ 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);
+ }
g_value_unset (&val);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]