From 25546fdd3e6a7d67e1ed1e834a88a35765af38b4 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Fri, 7 Jun 2024 00:58:31 -0400 Subject: Appearance under wayland: apply cursor size changes *Note that only compositors that read the cursor size from gsettings will apply this, wayfire does not at this time *This is also true of cursor theme: the compositor must read it from gsettings for it to be applied from the control center --- capplets/appearance/appearance-style.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'capplets/appearance/appearance-style.c') diff --git a/capplets/appearance/appearance-style.c b/capplets/appearance/appearance-style.c index 3cb250f9..3e23fe9f 100644 --- a/capplets/appearance/appearance-style.c +++ b/capplets/appearance/appearance-style.c @@ -482,6 +482,27 @@ static void cursor_size_changed_cb (int size, AppearanceData *data) { g_settings_set_int (data->mouse_settings, CURSOR_SIZE_KEY, size); + + /*If running under wayland and the GNOME interface schema is installed + *set the cursor size under the GNOME gsettings too + */ + if (!(GDK_IS_X11_DISPLAY (gdk_display_get_default()))) + { + GSettingsSchemaSource *source = g_settings_schema_source_get_default (); + + if (source) + { + GSettingsSchema *schema = g_settings_schema_source_lookup (source, INTERFACE_GNOME_SCHEMA, TRUE); + { + if (schema) + { + GSettings *interface_gnome_settings = NULL; + interface_gnome_settings = g_settings_new_full (schema, NULL, NULL); + g_settings_set_int (interface_gnome_settings, CURSOR_SIZE_KEY, size); + } + } + } + } } static void -- cgit v1.2.1