mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
Update cursor theme on wayland
Call the new new api from gtksettings.c when it changes, just as we do for X11. https://bugzilla.gnome.org/show_bug.cgi?id=696428
This commit is contained in:
parent
c61956c592
commit
75f4f7a471
@ -40,6 +40,10 @@
|
|||||||
#include <pango/pangofc-fontmap.h>
|
#include <pango/pangofc-fontmap.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_WAYLAND
|
||||||
|
#include "wayland/gdkwayland.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GDK_WINDOWING_QUARTZ
|
#ifdef GDK_WINDOWING_QUARTZ
|
||||||
#include "quartz/gdkquartz.h"
|
#include "quartz/gdkquartz.h"
|
||||||
#endif
|
#endif
|
||||||
@ -2552,23 +2556,27 @@ settings_update_modules (GtkSettings *settings)
|
|||||||
static void
|
static void
|
||||||
settings_update_cursor_theme (GtkSettings *settings)
|
settings_update_cursor_theme (GtkSettings *settings)
|
||||||
{
|
{
|
||||||
#ifdef GDK_WINDOWING_X11
|
|
||||||
GdkDisplay *display = gdk_screen_get_display (settings->priv->screen);
|
|
||||||
gchar *theme = NULL;
|
gchar *theme = NULL;
|
||||||
gint size = 0;
|
gint size = 0;
|
||||||
|
GdkDisplay *display = gdk_screen_get_display (settings->priv->screen);
|
||||||
|
|
||||||
|
g_object_get (settings,
|
||||||
|
"gtk-cursor-theme-name", &theme,
|
||||||
|
"gtk-cursor-theme-size", &size,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_X11
|
||||||
if (GDK_IS_X11_DISPLAY (display))
|
if (GDK_IS_X11_DISPLAY (display))
|
||||||
{
|
gdk_x11_display_set_cursor_theme (display, theme, size);
|
||||||
g_object_get (settings,
|
else
|
||||||
"gtk-cursor-theme-name", &theme,
|
|
||||||
"gtk-cursor-theme-size", &size,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
gdk_x11_display_set_cursor_theme (display, theme, size);
|
|
||||||
|
|
||||||
g_free (theme);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef GDK_WINDOWING_WAYLAND
|
||||||
|
if (GDK_IS_WAYLAND_DISPLAY (display))
|
||||||
|
gdk_wayland_display_set_cursor_theme (display, theme, size);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
g_warning ("unsupported GDK backend\n");
|
||||||
|
g_free (theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user