[gnome-shell/gnome-3-36] st/icon: Always show empty texture if both gicons are NULL



commit 51e9f19f2ff5d2863a23f762223596de419fc00c
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Sat Apr 4 08:12:06 2020 +0000

    st/icon: Always show empty texture if both gicons are NULL
    
    Commit 7ff7fb5d3b3ee655b1492226f68aeadac846e247 forgot to clear the
    `priv->icon_texture` actor when returning from st_icon_update(), which
    means we don't always switch to an empty icon if both gicon properties
    are set to NULL.
    
    Fix this and destroy the actor before returning early from
    st_icon_update().
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1178
    
    
    (cherry picked from commit 07deda593ab2e9ea30e3e1dca8c6bedd30e4ac0b)

 src/st/st-icon.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/st/st-icon.c b/src/st/st-icon.c
index e82adcc77f..fbc82bbd11 100644
--- a/src/st/st-icon.c
+++ b/src/st/st-icon.c
@@ -419,7 +419,10 @@ st_icon_update (StIcon *icon)
     }
 
   if (priv->gicon == NULL && priv->fallback_gicon == NULL)
-    return;
+    {
+      g_clear_pointer (&priv->icon_texture, clutter_actor_destroy);
+      return;
+    }
 
   if (!st_widget_get_resource_scale (ST_WIDGET (icon), &resource_scale))
     return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]