From 518e7f2c426b7c13ba1062b43c284d7c45a5fde8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= Date: Sat, 4 Mar 2017 15:27:54 +0200 Subject: libmetacity: do not reload CSS changing composited status --- libmetacity/meta-style-info.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'libmetacity/meta-style-info.c') diff --git a/libmetacity/meta-style-info.c b/libmetacity/meta-style-info.c index f1558907..a6d90992 100644 --- a/libmetacity/meta-style-info.c +++ b/libmetacity/meta-style-info.c @@ -340,6 +340,36 @@ meta_style_info_get_style (MetaStyleInfo *style_info, return style_info->styles[element]; } +void +meta_style_info_set_composited (MetaStyleInfo *style_info, + gboolean composited) +{ + gint i; + + if (style_info->composited == composited) + return; + + style_info->composited = composited; + + for (i = 0; i < META_STYLE_ELEMENT_LAST; i++) + { + GtkStyleContext *style; + + style = style_info->styles[i]; + + if (composited) + { + remove_toplevel_class (style, "solid-csd"); + add_toplevel_class (style, "csd"); + } + else + { + remove_toplevel_class (style, "csd"); + add_toplevel_class (style, "solid-csd"); + } + } +} + void meta_style_info_set_flags (MetaStyleInfo *style_info, MetaFrameFlags flags) -- cgit v1.2.1