[gnome-software/gnome-3-36] flatpak: don't show as legacy display without x11



commit 1de40c303d86b8f5e112357f0fc553efb7bf4beb
Author: Vanadiae <33552-Vanadiae users noreply gitlab gnome org>
Date:   Wed May 13 20:12:04 2020 +0000

    flatpak: don't show as legacy display without x11
    
    Currently, every Flathub app is show as using a "legacy display manager"
    whether they use x11 with --socket=x11, or wayland with
    --socket=wayland and --socket=fallback-x11.
    
    However, the fallback-x11 enables X11 only if the host doesn't support
    anything else than x11, so strictly speaking, it's the host that uses
    x11 and not usually the app.
    
    So this commit stops from showing this warning if using x11 as fallback.

 plugins/flatpak/gs-flatpak.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 27114717..af2af6f1 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -113,7 +113,9 @@ perms_from_metadata (GKeyFile *keyfile)
                permissions |= GS_APP_PERMISSIONS_SYSTEM_BUS;
        if (strv != NULL && g_strv_contains ((const gchar * const*)strv, "session-bus"))
                permissions |= GS_APP_PERMISSIONS_SESSION_BUS;
-       if (strv != NULL && g_strv_contains ((const gchar * const*)strv, "x11"))
+       if (strv != NULL &&
+           !g_strv_contains ((const gchar * const*)strv, "fallback-x11") &&
+           g_strv_contains ((const gchar * const*)strv, "x11"))
                permissions |= GS_APP_PERMISSIONS_X11;
        g_strfreev (strv);
 


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