[gnome-session/benzea/no-save-restore-required-components] session-fill: Never look for required components in saved session



commit c72e541f7ab3eb77bf1784b2627a1573d448cb70
Author: Benjamin Berg <bberg redhat com>
Date:   Wed Nov 20 15:35:39 2019 +0100

    session-fill: Never look for required components in saved session
    
    As required compoents are essential parts of the session, it does not
    make sense to restore them automatically. Should e.g. the global
    definition of the component change then we will want to pick up the new
    definition rather than keeping the old one.
    
    This addresses a migration issue to systemd startup where the shell may
    be started from an auto-saved XDG desktop file.
    
    The XDG desktop file will still be found as an autostart application
    later in the filling process. However, this entry will be ignored as the
    app is already registered in the store.
    
    See: #41

 gnome-session/gsm-session-fill.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gnome-session/gsm-session-fill.c b/gnome-session/gsm-session-fill.c
index af203bbc..a193d902 100644
--- a/gnome-session/gsm-session-fill.c
+++ b/gnome-session/gsm-session-fill.c
@@ -40,7 +40,6 @@ typedef void (*GsmFillHandleComponent) (const char *component,
 
 static void
 handle_required_components (GKeyFile               *keyfile,
-                            gboolean                look_in_saved_session,
                             GsmFillHandleComponent  callback,
                             gpointer                user_data)
 {
@@ -62,7 +61,7 @@ handle_required_components (GKeyFile               *keyfile,
                 char *app_path;
 
                 app_path = gsm_util_find_desktop_file_for_app_name (required_components[i],
-                                                                    look_in_saved_session, TRUE);
+                                                                    FALSE, TRUE);
                 callback (required_components[i], app_path, user_data);
                 g_free (app_path);
         }
@@ -90,7 +89,7 @@ check_required (GKeyFile *keyfile)
 
         g_debug ("fill: *** Checking required components");
 
-        handle_required_components (keyfile, FALSE,
+        handle_required_components (keyfile,
                                     check_required_components_helper, &error);
 
         g_debug ("fill: *** Done checking required components");
@@ -133,7 +132,7 @@ load_standard_apps (GsmManager *manager,
                     GKeyFile   *keyfile)
 {
         g_debug ("fill: *** Adding required components");
-        handle_required_components (keyfile, !gsm_manager_get_failsafe (manager),
+        handle_required_components (keyfile,
                                     append_required_components_helper, manager);
         g_debug ("fill: *** Done adding required components");
 


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