From ba547ec1db9015efdef5891f931a714095f2a22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Mon, 18 Nov 2019 00:44:36 +0100 Subject: [PATCH] st/widget: Emit "style-changed" on all theme changes Since now the resource consumption of the "style-changed" signal handlers should be significantly lower, we can start emitting the signal in all cases again as it was originally intended. This fixes some small visual issues, like the battery percentage in the panel only being shown on hover or updating the size of StIcons on scale-factor changes. This effectively reverts f74c07b9acbdc6945ca37f86bc680701f048f174 Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1708 Part-of: --- src/st/st-widget.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/st/st-widget.c b/src/st/st-widget.c index 69bf86c5d..e131a5108 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -1740,29 +1740,7 @@ st_widget_recompute_style (StWidget *widget, st_theme_node_paint_state_invalidate (current_paint_state (widget)); } - /* It is very likely that custom CSS properties are used with StDrawingArea - to control the custom drawing, so never omit the ::style-changed signal */ - if (paint_equal) - paint_equal = !ST_IS_DRAWING_AREA (widget); - - if (paint_equal && old_theme_node->font_desc != NULL) - paint_equal = pango_font_description_equal (old_theme_node->font_desc, - st_theme_node_get_font (new_theme_node)); - - if (paint_equal && old_theme_node->foreground_computed) - { - ClutterColor col; - - st_theme_node_get_foreground_color (new_theme_node, &col); - paint_equal = clutter_color_equal (&old_theme_node->foreground_color, &col); - } - - if (paint_equal && old_theme_node->icon_colors) - paint_equal = st_icon_colors_equal (old_theme_node->icon_colors, - st_theme_node_get_icon_colors (new_theme_node)); - - if (!paint_equal || !geometry_equal) - g_signal_emit (widget, signals[STYLE_CHANGED], 0); + g_signal_emit (widget, signals[STYLE_CHANGED], 0); priv->is_style_dirty = FALSE; }