[gnome-shell] st-theme-node: reset paint state when theme node changes
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-theme-node: reset paint state when theme node changes
- Date: Thu, 18 Jul 2013 00:50:24 +0000 (UTC)
commit fd83990d8a5012cd149f089e68850fc84c47538c
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Thu Jul 18 00:58:47 2013 +0100
st-theme-node: reset paint state when theme node changes
https://bugzilla.gnome.org/show_bug.cgi?id=704430
src/st/st-theme-node-drawing.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c
index 74751dc..dc5b817 100644
--- a/src/st/st-theme-node-drawing.c
+++ b/src/st/st-theme-node-drawing.c
@@ -2392,7 +2392,13 @@ st_theme_node_paint (StThemeNode *node,
if (width <= 0 || height <= 0)
return;
- if (st_theme_node_needs_new_box_shadow_for_size (state, node, width, height))
+ /* Check whether we need to recreate the textures of the paint
+ * state, either because :
+ * 1) the theme node associated to the paint state has changed
+ * 2) the allocation size change requires recreating textures
+ */
+ if (state->node != node ||
+ st_theme_node_needs_new_box_shadow_for_size (state, node, width, height))
{
/* If we had the ability to cache textures on the node, then we
can just copy them over to the paint state and avoid all
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]