[gnome-software: 1/2] gs-app-context-bar: Fix re-showing tiles after viewing a non-desktop app




commit ba13754a107c4a01e5eef81e90ad4819ee76a4ae
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Sep 7 16:39:06 2021 +0100

    gs-app-context-bar: Fix re-showing tiles after viewing a non-desktop app
    
    Since !938, some of the context tiles are hidden for non-desktop apps
    because they can’t show any information relevant to non-desktop apps.
    
    However, they remained hidden when switching to viewing a desktop app,
    which was not the intended behaviour.
    
    This was because `gtk_widget_is_visible()` takes the visibility of the
    widget’s parents into account. This meant that once one of the parent
    widgets (i.e. the containing box) was hidden, the tiles inside would
    never be un-hidden.
    
    Fix that by only taking the visibility of the tiles themselves, and not
    their ancestors, into account as was intended when I wrote the code.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Fixes: #1434

 src/gs-app-context-bar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gs-app-context-bar.c b/src/gs-app-context-bar.c
index d1f34efd8..9ae9157f0 100644
--- a/src/gs-app-context-bar.c
+++ b/src/gs-app-context-bar.c
@@ -103,7 +103,7 @@ show_tile_for_non_applications (GsAppContextBar      *self,
        for (GList *l = siblings; l != NULL; l = l->next) {
                GtkWidget *sibling = GTK_WIDGET (l->data);
                g_assert (GTK_IS_BUTTON (sibling));
-               any_siblings_visible |= gtk_widget_is_visible (sibling);
+               any_siblings_visible |= gtk_widget_get_visible (sibling);
        }
 
        gtk_widget_set_visible (GTK_WIDGET (parent_box), any_siblings_visible);


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