diff options
Diffstat (limited to 'src/core/window-props.c')
-rw-r--r-- | src/core/window-props.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/window-props.c b/src/core/window-props.c index c3200290..0f492a5e 100644 --- a/src/core/window-props.c +++ b/src/core/window-props.c @@ -1530,6 +1530,28 @@ reload_transient_for (MetaWindow *window, meta_window_queue (window, META_QUEUE_MOVE_RESIZE); } +static void +reload_gtk_theme_variant (MetaWindow *window, + MetaPropValue *value, + gboolean initial) +{ + char *requested_variant = NULL; + char *current_variant = window->gtk_theme_variant; + + if (value->type != META_PROP_VALUE_INVALID) + { + requested_variant = value->v.str; + meta_verbose ("Requested \"%s\" theme variant for window %s.\n", + requested_variant, window->desc); + } + + if (g_strcmp0 (requested_variant, current_variant) != 0) + { + g_free (current_variant); + + window->gtk_theme_variant = g_strdup (requested_variant); + } +} /** * Initialises the property hooks system. Each row in the table named "hooks" * represents an action to take when a property is found on a newly-created @@ -1576,6 +1598,7 @@ meta_display_init_window_prop_hooks (MetaDisplay *display) { XA_WM_HINTS, META_PROP_VALUE_WM_HINTS, reload_wm_hints }, { XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for }, { display->atom__NET_WM_USER_TIME_WINDOW, META_PROP_VALUE_WINDOW, reload_net_wm_user_time_window }, + { display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, }, { display->atom__GTK_FRAME_EXTENTS, META_PROP_VALUE_CARDINAL_LIST, reload_gtk_frame_extents }, { 0 }, }; |