summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-11-17 17:56:03 -0500
committerMatthias Clasen <mclasen@redhat.com>2017-11-17 17:56:03 -0500
commitdd7163a69966c443cd54f962fb5838794e9bf05d (patch)
tree0930fe37beaa7026a8e7980851153a2902ac321f
parentc2f6208ce546da5e5585616f49af7753f3cce2b4 (diff)
downloadgtk+-wip/matthiasc/settings.tar.gz
settings: Use gdk_display_set_cursor_themewip/matthiasc/settings
This allows us to reduce the amount of ifdef ugliness.
-rw-r--r--gtk/gtksettings.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index f0c6be958f..5ee12bf91a 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -2106,25 +2106,11 @@ settings_update_cursor_theme (GtkSettings *settings)
"gtk-cursor-theme-name", &theme,
"gtk-cursor-theme-size", &size,
NULL);
- if (theme == NULL)
- return;
-#ifdef GDK_WINDOWING_X11
- if (GDK_IS_X11_DISPLAY (priv->display))
- gdk_x11_display_set_cursor_theme (priv->display, theme, size);
- else
-#endif
-#ifdef GDK_WINDOWING_WAYLAND
- if (GDK_IS_WAYLAND_DISPLAY (priv->display))
- gdk_wayland_display_set_cursor_theme (priv->display, theme, size);
- else
-#endif
-#ifdef GDK_WINDOWING_WIN32
- if (GDK_IS_WIN32_DISPLAY (priv->display))
- gdk_win32_display_set_cursor_theme (priv->display, theme, size);
- else
-#endif
- g_warning ("GtkSettings Cursor Theme: Unsupported GDK backend");
- g_free (theme);
+ if (theme)
+ {
+ gdk_display_set_cursor_theme (priv->display, theme, size);
+ g_free (theme);
+ }
}
static void