From 244a5d0ae95b4cd6fdb3a249f8d6f1678267a880 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:41:56 +0000 Subject: import gnome-session-3.26.1-11.el7 --- diff --git a/.gitignore b/.gitignore index 7e9dd9c..a0f7905 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/gnome-session-3.22.3.tar.xz +SOURCES/gnome-session-3.26.1.tar.xz diff --git a/.gnome-session.metadata b/.gnome-session.metadata index 6796fde..5f962ac 100644 --- a/.gnome-session.metadata +++ b/.gnome-session.metadata @@ -1 +1 @@ -84daef055a4aad831950341e83c5b34091479006 SOURCES/gnome-session-3.22.3.tar.xz +dcb7aca725d43baec706e72e7256ccc88495bb24 SOURCES/gnome-session-3.26.1.tar.xz diff --git a/SOURCES/0001-Revert-Remove-all-references-to-gnome-session-proper.patch b/SOURCES/0001-Revert-Remove-all-references-to-gnome-session-proper.patch index 5c9491b..0552108 100644 --- a/SOURCES/0001-Revert-Remove-all-references-to-gnome-session-proper.patch +++ b/SOURCES/0001-Revert-Remove-all-references-to-gnome-session-proper.patch @@ -1,4 +1,4 @@ -From 5d77ba7a2ce0bedfc65a991bd232e518418ce950 Mon Sep 17 00:00:00 2001 +From 8ba34a8831751b0825cabbcfc552e14e3510af2b Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 8 Mar 2017 14:08:09 -0500 Subject: [PATCH 01/19] Revert "Remove all references to @@ -51,7 +51,7 @@ This reverts commit 0c6fe6ca14b65cdfc1cd039a5cc9cb83ea346d6b. create mode 100644 data/session-properties.ui diff --git a/configure.ac b/configure.ac -index c6facb35..776c8208 100644 +index ec41462e..f57dcf3d 100644 --- a/configure.ac +++ b/configure.ac @@ -343,60 +343,68 @@ if test $enable_ipv6 = yes; then @@ -124,7 +124,7 @@ index c6facb35..776c8208 100644 GConf support: ${enable_gconf} Session tracking: ${session_tracking} diff --git a/data/Makefile.am b/data/Makefile.am -index ae08730d..a171dfcb 100644 +index d8c45573..413279a2 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,32 +1,35 @@ @@ -2847,5 +2847,5 @@ index cc1170aa..76882645 100644 tools/gnome-session-selector.c tools/gnome-session-quit.c -- -2.12.0 +2.14.2 diff --git a/SOURCES/0001-fail-whale-handle-X-server-dying-before-startup.patch b/SOURCES/0001-fail-whale-handle-X-server-dying-before-startup.patch deleted file mode 100644 index 5390164..0000000 --- a/SOURCES/0001-fail-whale-handle-X-server-dying-before-startup.patch +++ /dev/null @@ -1,89 +0,0 @@ -From ec58cbbc612992e2de70cbbb858bbbb25cac6aff Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Tue, 30 May 2017 12:46:19 -0400 -Subject: [PATCH] fail-whale: handle X server dying before startup - -This commit deals with gtk_init_with_args failing, -without setting an error (which it does if it can't -connect to the X server). ---- - gnome-session/gsm-fail-whale-dialog.c | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -diff --git a/gnome-session/gsm-fail-whale-dialog.c b/gnome-session/gsm-fail-whale-dialog.c -index f53ce417..c5889efc 100644 ---- a/gnome-session/gsm-fail-whale-dialog.c -+++ b/gnome-session/gsm-fail-whale-dialog.c -@@ -344,55 +344,62 @@ setup_window (GsmFailWhaleDialog *fail_dialog) - G_CALLBACK (on_logout_clicked), fail_dialog); - } - } - - static void - gsm_fail_whale_dialog_init (GsmFailWhaleDialog *fail_dialog) - { - fail_dialog->priv = GSM_FAIL_WHALE_DIALOG_GET_PRIVATE (fail_dialog); - } - - static gboolean debug_mode = FALSE; - static gboolean allow_logout = FALSE; - static gboolean extensions = FALSE; - - int main (int argc, char *argv[]) - { - GOptionEntry entries[] = { - { "debug", 0, 0, G_OPTION_ARG_NONE, &debug_mode, N_("Enable debugging code"), NULL }, - { "allow-logout", 0, 0, G_OPTION_ARG_NONE, &allow_logout, N_("Allow logout"), NULL }, - { "extensions", 0, 0, G_OPTION_ARG_NONE, &extensions, N_("Show extension warning"), NULL }, - { NULL, 0, 0, 0, NULL, NULL, NULL } - }; - - GsmFailWhaleDialog *fail_dialog; - GError *error = NULL; - - bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); - -- gtk_init_with_args (&argc, &argv, " - fail whale", -- entries, GETTEXT_PACKAGE, -- &error); -- if (error != NULL) { -- g_warning ("%s", error->message); -- exit (1); -- } -+ if (!gtk_init_with_args (&argc, &argv, " - fail whale", -+ entries, GETTEXT_PACKAGE, -+ &error)) { -+ if (error != NULL) { -+ g_warning ("%s", error->message); -+ exit (1); -+ } -+ -+ /* display server probably went away. Could be for legitimate reasons, could be for -+ * unexpected reasons. If it went away unexpectantly, that's logged elsewhere, so -+ * let's not add noise by logging here. -+ */ -+ return 0; -+ } - - fail_dialog = g_object_new (GSM_TYPE_FAIL_WHALE_DIALOG, NULL); - fail_dialog->priv->debug_mode = debug_mode; - fail_dialog->priv->allow_logout = allow_logout; - fail_dialog->priv->extensions = extensions; - - setup_window (fail_dialog); - - g_signal_connect (fail_dialog, "destroy", - G_CALLBACK (gtk_main_quit), NULL); - - gtk_widget_show (GTK_WIDGET (fail_dialog)); - - gtk_main (); - - return 0; - } - --- -2.13.0 - diff --git a/SOURCES/0001-main-don-t-call-into-gdbus-before-setting-all-enviro.patch b/SOURCES/0001-main-don-t-call-into-gdbus-before-setting-all-enviro.patch new file mode 100644 index 0000000..8c7dcf1 --- /dev/null +++ b/SOURCES/0001-main-don-t-call-into-gdbus-before-setting-all-enviro.patch @@ -0,0 +1,119 @@ +From 2c0087930a188684e61e71d5b5459e4363471196 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Wed, 14 Feb 2018 09:50:56 -0500 +Subject: [PATCH] main: don't call into gdbus before setting all environment + variables + +setenv () is not multi-thread safe so we need to avoid gsm_util_setenv +calls (which fire off the glib worker thread) before we finish +doing all our setenv() work. +--- + gnome-session/main.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/gnome-session/main.c b/gnome-session/main.c +index e2c3efe..e7a1614 100644 +--- a/gnome-session/main.c ++++ b/gnome-session/main.c +@@ -244,91 +244,96 @@ initialize_gio (void) + disable_fuse = g_strdup (g_getenv ("GVFS_DISABLE_FUSE")); + use_vfs = g_strdup (g_getenv ("GIO_USE_VFS")); + + g_setenv ("GVFS_DISABLE_FUSE", "1", TRUE); + g_setenv ("GIO_USE_VFS", "local", TRUE); + g_vfs_get_default (); + + if (use_vfs) { + g_setenv ("GIO_USE_VFS", use_vfs, TRUE); + g_free (use_vfs); + } else { + g_unsetenv ("GIO_USE_VFS"); + } + + if (disable_fuse) { + g_setenv ("GVFS_DISABLE_FUSE", disable_fuse, TRUE); + g_free (disable_fuse); + } else { + g_unsetenv ("GVFS_DISABLE_FUSE"); + } + } + + int + main (int argc, char **argv) + { + GError *error = NULL; + static char **override_autostart_dirs = NULL; + static char *opt_session_name = NULL; + const char *debug_string = NULL; + gboolean gl_failed = FALSE; ++ gboolean needs_current_desktop_setenv = FALSE; + guint name_owner_id; + GOptionContext *options; + static GOptionEntry entries[] = { + { "autostart", 'a', 0, G_OPTION_ARG_STRING_ARRAY, &override_autostart_dirs, N_("Override standard autostart directories"), N_("AUTOSTART_DIR") }, + { "session", 0, 0, G_OPTION_ARG_STRING, &opt_session_name, N_("Session to use"), N_("SESSION_NAME") }, + { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL }, + { "failsafe", 'f', 0, G_OPTION_ARG_NONE, &failsafe, N_("Do not load user-specified applications"), NULL }, + { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL }, + /* Translators: the 'fail whale' is the black dialog we show when something goes seriously wrong */ + { "whale", 0, 0, G_OPTION_ARG_NONE, &please_fail, N_("Show the fail whale dialog for testing"), NULL }, + { "disable-acceleration-check", 0, 0, G_OPTION_ARG_NONE, &disable_acceleration_check, N_("Disable hardware acceleration check"), NULL }, + { NULL, 0, 0, 0, NULL, NULL, NULL } + }; + + /* Make sure that we have a session bus */ + if (!require_dbus_session (argc, argv, &error)) { + gsm_util_init_error (TRUE, "%s", error->message); + } + + /* From 3.14 GDM sets XDG_CURRENT_DESKTOP. For compatibility with + * older versions of GDM, other display managers, and startx, + * set a fallback value if we don't find it set. + */ + if (g_getenv ("XDG_CURRENT_DESKTOP") == NULL) { +- g_setenv("XDG_CURRENT_DESKTOP", "GNOME", TRUE); +- gsm_util_setenv ("XDG_CURRENT_DESKTOP", "GNOME"); ++ g_setenv ("XDG_CURRENT_DESKTOP", "GNOME", TRUE); ++ needs_current_desktop_setenv = TRUE; + } + + /* Make sure we initialize gio in a way that does not autostart any daemon */ + initialize_gio (); + ++ if (needs_current_desktop_setenv) { ++ gsm_util_setenv ("XDG_CURRENT_DESKTOP", "GNOME"); ++ } ++ + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + + debug_string = g_getenv ("GNOME_SESSION_DEBUG"); + if (debug_string != NULL) { + debug = rpmatch (debug_string) == TRUE || atoi (debug_string) == 1; + } + + error = NULL; + options = g_option_context_new (_(" — the GNOME session manager")); + g_option_context_add_main_entries (options, entries, GETTEXT_PACKAGE); + g_option_context_parse (options, &argc, &argv, &error); + if (error != NULL) { + g_warning ("%s", error->message); + exit (1); + } + + g_option_context_free (options); + + /* Rebind stdout/stderr to the journal explicitly, so that + * journald picks ups the nicer "gnome-session" as the program + * name instead of whatever shell script GDM happened to use. + */ + #ifdef HAVE_SYSTEMD + if (!debug) { + int journalfd; + + journalfd = sd_journal_stream_fd (PACKAGE, LOG_INFO, 0); +-- +2.14.3 + diff --git a/SOURCES/0001-save-make-sure-app-state-is-written-into-desktop-fil.patch b/SOURCES/0001-save-make-sure-app-state-is-written-into-desktop-fil.patch new file mode 100644 index 0000000..c23dc01 --- /dev/null +++ b/SOURCES/0001-save-make-sure-app-state-is-written-into-desktop-fil.patch @@ -0,0 +1,1186 @@ +From 5e8c5967d65f61a58241c6429eb79650870fa7d0 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Mon, 27 Nov 2017 15:40:54 -0500 +Subject: [PATCH 1/2] save: make sure app state is written into desktop file + +There are a number of important bits of app state written into +an applications desktop file that needs to be restored when +the session is saved. For instance, the phase in which the client +should get started. + +That state is currently stored on the GsmApp object, which is +inaccessible, from the client save function. + +This commit adds the neccesary plumbing to route the GsmApp object +associated with a client to the client save function, and also +adds code to allow the app object to augment the client keyfile at +save time. + +https://bugzilla.gnome.org/show_bug.cgi?id=790913 + +https://bugzilla.redhat.com/show_bug.cgi?id=1529175 +--- + gnome-session/gsm-app.c | 9 +++++ + gnome-session/gsm-app.h | 8 +++++ + gnome-session/gsm-autostart-app.c | 70 +++++++++++++++++++++++++++++++++++++++ + gnome-session/gsm-client.c | 3 +- + gnome-session/gsm-client.h | 3 ++ + gnome-session/gsm-dbus-client.c | 1 + + gnome-session/gsm-manager.c | 4 +-- + gnome-session/gsm-session-save.c | 41 +++++++++++++++++------ + gnome-session/gsm-session-save.h | 1 + + gnome-session/gsm-xsmp-client.c | 9 +++++ + 10 files changed, 135 insertions(+), 14 deletions(-) + +diff --git a/gnome-session/gsm-app.c b/gnome-session/gsm-app.c +index 845e067a..d1ef89a8 100644 +--- a/gnome-session/gsm-app.c ++++ b/gnome-session/gsm-app.c +@@ -531,30 +531,39 @@ gsm_app_exited (GsmApp *app, + } + + void + gsm_app_died (GsmApp *app, + int signal) + { + g_return_if_fail (GSM_IS_APP (app)); + + g_signal_emit (app, signals[DIED], 0, signal); + } + + gboolean + gsm_app_get_registered (GsmApp *app) + { + g_return_val_if_fail (GSM_IS_APP (app), FALSE); + + return app->priv->registered; + } + + void + gsm_app_set_registered (GsmApp *app, + gboolean registered) + { + g_return_if_fail (GSM_IS_APP (app)); + + if (app->priv->registered != registered) { + app->priv->registered = registered; + g_object_notify (G_OBJECT (app), "registered"); + } + } ++ ++gboolean ++gsm_app_save_to_keyfile (GsmApp *app, ++ GKeyFile *keyfile, ++ GError **error) ++{ ++ g_debug ("Saving app: %s", app->priv->id); ++ return GSM_APP_GET_CLASS (app)->impl_save_to_keyfile (app, keyfile, error); ++} +diff --git a/gnome-session/gsm-app.h b/gnome-session/gsm-app.h +index 14a9f94b..f38b3be4 100644 +--- a/gnome-session/gsm-app.h ++++ b/gnome-session/gsm-app.h +@@ -47,80 +47,88 @@ struct _GsmApp + }; + + struct _GsmAppClass + { + GObjectClass parent_class; + + /* signals */ + void (*exited) (GsmApp *app, + guchar exit_code); + void (*died) (GsmApp *app, + int signal); + + /* virtual methods */ + gboolean (*impl_start) (GsmApp *app, + GError **error); + gboolean (*impl_restart) (GsmApp *app, + GError **error); + gboolean (*impl_stop) (GsmApp *app, + GError **error); + gboolean (*impl_provides) (GsmApp *app, + const char *service); + char ** (*impl_get_provides) (GsmApp *app); + gboolean (*impl_has_autostart_condition) (GsmApp *app, + const char *service); + gboolean (*impl_is_running) (GsmApp *app); + + gboolean (*impl_get_autorestart) (GsmApp *app); + const char *(*impl_get_app_id) (GsmApp *app); + gboolean (*impl_is_disabled) (GsmApp *app); + gboolean (*impl_is_conditionally_disabled) (GsmApp *app); ++ ++ gboolean (*impl_save_to_keyfile) (GsmApp *app, ++ GKeyFile *keyfile, ++ GError **error); + }; + + typedef enum + { + GSM_APP_ERROR_GENERAL = 0, + GSM_APP_ERROR_RESTART_LIMIT, + GSM_APP_ERROR_START, + GSM_APP_ERROR_STOP, + GSM_APP_NUM_ERRORS + } GsmAppError; + + #define GSM_APP_ERROR gsm_app_error_quark () + + GQuark gsm_app_error_quark (void); + GType gsm_app_get_type (void) G_GNUC_CONST; + + gboolean gsm_app_peek_autorestart (GsmApp *app); + + const char *gsm_app_peek_id (GsmApp *app); + const char *gsm_app_peek_app_id (GsmApp *app); + const char *gsm_app_peek_startup_id (GsmApp *app); + GsmManagerPhase gsm_app_peek_phase (GsmApp *app); + gboolean gsm_app_peek_is_disabled (GsmApp *app); + gboolean gsm_app_peek_is_conditionally_disabled (GsmApp *app); + + gboolean gsm_app_start (GsmApp *app, + GError **error); + gboolean gsm_app_restart (GsmApp *app, + GError **error); + gboolean gsm_app_stop (GsmApp *app, + GError **error); + gboolean gsm_app_is_running (GsmApp *app); + + void gsm_app_exited (GsmApp *app, + guchar exit_code); + void gsm_app_died (GsmApp *app, + int signal); + + gboolean gsm_app_provides (GsmApp *app, + const char *service); + char **gsm_app_get_provides (GsmApp *app); + gboolean gsm_app_has_autostart_condition (GsmApp *app, + const char *condition); + gboolean gsm_app_get_registered (GsmApp *app); + void gsm_app_set_registered (GsmApp *app, + gboolean registered); + ++gboolean gsm_app_save_to_keyfile (GsmApp *app, ++ GKeyFile *keyfile, ++ GError **error); ++ + G_END_DECLS + + #endif /* __GSM_APP_H__ */ +diff --git a/gnome-session/gsm-autostart-app.c b/gnome-session/gsm-autostart-app.c +index 870b1516..9eb1db5b 100644 +--- a/gnome-session/gsm-autostart-app.c ++++ b/gnome-session/gsm-autostart-app.c +@@ -1400,86 +1400,156 @@ gsm_autostart_app_get_autorestart (GsmApp *app) + static const char * + gsm_autostart_app_get_app_id (GsmApp *app) + { + if (GSM_AUTOSTART_APP (app)->priv->app_info == NULL) { + return NULL; + } + + return g_app_info_get_id (G_APP_INFO (GSM_AUTOSTART_APP (app)->priv->app_info)); + } + + static gboolean + gsm_autostart_app_initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error) + { + GsmAutostartApp *app = GSM_AUTOSTART_APP (initable); + + g_assert (app->priv->desktop_filename != NULL); + app->priv->app_info = g_desktop_app_info_new_from_filename (app->priv->desktop_filename); + if (app->priv->app_info == NULL) { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "Could not parse desktop file %s or it references a not found TryExec binary", app->priv->desktop_id); + return FALSE; + } + + load_desktop_file (app); + + return TRUE; + } + ++static gboolean ++gsm_autostart_app_save_to_keyfile (GsmApp *base_app, ++ GKeyFile *keyfile, ++ GError **error) ++{ ++ GsmAutostartApp *app = GSM_AUTOSTART_APP (base_app); ++ char **provides = NULL; ++ char *dbus_name; ++ char *phase; ++ gboolean res; ++ ++ provides = gsm_app_get_provides (base_app); ++ if (provides != NULL) { ++ g_key_file_set_string_list (keyfile, ++ G_KEY_FILE_DESKTOP_GROUP, ++ GSM_AUTOSTART_APP_PROVIDES_KEY, ++ (const char * const *) ++ provides, ++ g_strv_length (provides)); ++ g_strfreev (provides); ++ } ++ ++ phase = g_desktop_app_info_get_string (app->priv->app_info, ++ GSM_AUTOSTART_APP_PHASE_KEY); ++ if (phase != NULL) { ++ g_key_file_set_string (keyfile, ++ G_KEY_FILE_DESKTOP_GROUP, ++ GSM_AUTOSTART_APP_PHASE_KEY, ++ phase); ++ g_free (phase); ++ } ++ ++ dbus_name = g_desktop_app_info_get_string (app->priv->app_info, ++ GSM_AUTOSTART_APP_DBUS_NAME_KEY); ++ if (dbus_name != NULL) { ++ g_key_file_set_string (keyfile, ++ G_KEY_FILE_DESKTOP_GROUP, ++ GSM_AUTOSTART_APP_DBUS_NAME_KEY, ++ dbus_name); ++ g_free (dbus_name); ++ } ++ ++ res = g_desktop_app_info_has_key (app->priv->app_info, ++ GSM_AUTOSTART_APP_AUTORESTART_KEY); ++ if (res) { ++ g_key_file_set_boolean (keyfile, ++ G_KEY_FILE_DESKTOP_GROUP, ++ GSM_AUTOSTART_APP_AUTORESTART_KEY, ++ g_desktop_app_info_get_boolean (app->priv->app_info, ++ GSM_AUTOSTART_APP_AUTORESTART_KEY)); ++ } ++ ++ res = g_desktop_app_info_has_key (app->priv->app_info, ++ GSM_AUTOSTART_APP_AUTORESTART_KEY); ++ if (res) { ++ char *autostart_condition; ++ ++ autostart_condition = g_desktop_app_info_get_string (app->priv->app_info, "AutostartCondition"); ++ ++ g_key_file_set_string (keyfile, ++ G_KEY_FILE_DESKTOP_GROUP, ++ "AutostartCondition", ++ autostart_condition); ++ g_free (autostart_condition); ++ } ++ ++ return TRUE; ++} ++ + static void + gsm_autostart_app_initable_iface_init (GInitableIface *iface) + { + iface->init = gsm_autostart_app_initable_init; + } + + static void + gsm_autostart_app_class_init (GsmAutostartAppClass *klass) + { + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GsmAppClass *app_class = GSM_APP_CLASS (klass); + + object_class->set_property = gsm_autostart_app_set_property; + object_class->get_property = gsm_autostart_app_get_property; + object_class->dispose = gsm_autostart_app_dispose; + + app_class->impl_is_disabled = is_disabled; + app_class->impl_is_conditionally_disabled = is_conditionally_disabled; + app_class->impl_is_running = is_running; + app_class->impl_start = gsm_autostart_app_start; + app_class->impl_restart = gsm_autostart_app_restart; + app_class->impl_stop = gsm_autostart_app_stop; + app_class->impl_provides = gsm_autostart_app_provides; + app_class->impl_get_provides = gsm_autostart_app_get_provides; + app_class->impl_has_autostart_condition = gsm_autostart_app_has_autostart_condition; + app_class->impl_get_app_id = gsm_autostart_app_get_app_id; + app_class->impl_get_autorestart = gsm_autostart_app_get_autorestart; ++ app_class->impl_save_to_keyfile = gsm_autostart_app_save_to_keyfile; + + g_object_class_install_property (object_class, + PROP_DESKTOP_FILENAME, + g_param_spec_string ("desktop-filename", + "Desktop filename", + "Freedesktop .desktop file", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + signals[CONDITION_CHANGED] = + g_signal_new ("condition-changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GsmAutostartAppClass, condition_changed), + NULL, NULL, NULL, + G_TYPE_NONE, + 1, + G_TYPE_BOOLEAN); + + g_type_class_add_private (object_class, sizeof (GsmAutostartAppPrivate)); + } + + GsmApp * + gsm_autostart_app_new (const char *desktop_file, + GError **error) + { + return (GsmApp*) g_initable_new (GSM_TYPE_AUTOSTART_APP, NULL, error, + "desktop-filename", desktop_file, + NULL); + } +diff --git a/gnome-session/gsm-client.c b/gnome-session/gsm-client.c +index 7b78d9e1..3f216b22 100644 +--- a/gnome-session/gsm-client.c ++++ b/gnome-session/gsm-client.c +@@ -526,47 +526,48 @@ gsm_client_end_session (GsmClient *client, + return GSM_CLIENT_GET_CLASS (client)->impl_end_session (client, flags, error); + } + + gboolean + gsm_client_stop (GsmClient *client, + GError **error) + { + g_return_val_if_fail (GSM_IS_CLIENT (client), FALSE); + + return GSM_CLIENT_GET_CLASS (client)->impl_stop (client, error); + } + + void + gsm_client_disconnected (GsmClient *client) + { + g_signal_emit (client, signals[DISCONNECTED], 0); + } + + gboolean + gsm_client_request_save (GsmClient *client, + guint flags, + GError **error) + { + g_return_val_if_fail (GSM_IS_CLIENT (client), FALSE); + + return GSM_CLIENT_GET_CLASS (client)->impl_request_save (client, flags, error); + } + + GKeyFile * + gsm_client_save (GsmClient *client, ++ GsmApp *app, + GError **error) + { + g_return_val_if_fail (GSM_IS_CLIENT (client), FALSE); + +- return GSM_CLIENT_GET_CLASS (client)->impl_save (client, error); ++ return GSM_CLIENT_GET_CLASS (client)->impl_save (client, app, error); + } + + void + gsm_client_end_session_response (GsmClient *client, + gboolean is_ok, + gboolean do_last, + gboolean cancel, + const char *reason) + { + g_signal_emit (client, signals[END_SESSION_RESPONSE], 0, + is_ok, do_last, cancel, reason); + } +diff --git a/gnome-session/gsm-client.h b/gnome-session/gsm-client.h +index f79896b3..19c9cd8d 100644 +--- a/gnome-session/gsm-client.h ++++ b/gnome-session/gsm-client.h +@@ -6,60 +6,61 @@ + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + + #ifndef __GSM_CLIENT_H__ + #define __GSM_CLIENT_H__ + + #include + #include + #include + + G_BEGIN_DECLS + + #define GSM_TYPE_CLIENT (gsm_client_get_type ()) + #define GSM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSM_TYPE_CLIENT, GsmClient)) + #define GSM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSM_TYPE_CLIENT, GsmClientClass)) + #define GSM_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSM_TYPE_CLIENT)) + #define GSM_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSM_TYPE_CLIENT)) + #define GSM_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSM_TYPE_CLIENT, GsmClientClass)) + ++typedef struct _GsmApp GsmApp; + typedef struct _GsmClient GsmClient; + typedef struct _GsmClientClass GsmClientClass; + + typedef struct GsmClientPrivate GsmClientPrivate; + + typedef enum { + GSM_CLIENT_UNREGISTERED = 0, + GSM_CLIENT_REGISTERED, + GSM_CLIENT_FINISHED, + GSM_CLIENT_FAILED + } GsmClientStatus; + + typedef enum { + GSM_CLIENT_RESTART_NEVER = 0, + GSM_CLIENT_RESTART_IF_RUNNING, + GSM_CLIENT_RESTART_ANYWAY, + GSM_CLIENT_RESTART_IMMEDIATELY + } GsmClientRestartStyle; + + typedef enum { + GSM_CLIENT_END_SESSION_FLAG_FORCEFUL = 1 << 0, + GSM_CLIENT_END_SESSION_FLAG_SAVE = 1 << 1, + GSM_CLIENT_END_SESSION_FLAG_LAST = 1 << 2 + } GsmClientEndSessionFlag; + + struct _GsmClient + { + GObject parent; + GsmClientPrivate *priv; + }; +@@ -67,91 +68,93 @@ struct _GsmClient + struct _GsmClientClass + { + GObjectClass parent_class; + + /* signals */ + void (*disconnected) (GsmClient *client); + void (*end_session_response) (GsmClient *client, + gboolean ok, + gboolean do_last, + gboolean cancel, + const char *reason); + + /* virtual methods */ + char * (*impl_get_app_name) (GsmClient *client); + GsmClientRestartStyle (*impl_get_restart_style_hint) (GsmClient *client); + guint (*impl_get_unix_process_id) (GsmClient *client); + gboolean (*impl_query_end_session) (GsmClient *client, + GsmClientEndSessionFlag flags, + GError **error); + gboolean (*impl_end_session) (GsmClient *client, + GsmClientEndSessionFlag flags, + GError **error); + gboolean (*impl_cancel_end_session) (GsmClient *client, + GError **error); + gboolean (*impl_stop) (GsmClient *client, + GError **error); + gboolean (*impl_request_save) (GsmClient *client, + guint flags, + GError **error); + GKeyFile * (*impl_save) (GsmClient *client, ++ GsmApp *app, + GError **error); + }; + + typedef enum + { + GSM_CLIENT_ERROR_GENERAL = 0, + GSM_CLIENT_ERROR_NOT_REGISTERED, + GSM_CLIENT_NUM_ERRORS + } GsmClientError; + + #define GSM_CLIENT_ERROR gsm_client_error_quark () + GQuark gsm_client_error_quark (void); + + GType gsm_client_get_type (void) G_GNUC_CONST; + + const char *gsm_client_peek_id (GsmClient *client); + + + const char * gsm_client_peek_startup_id (GsmClient *client); + const char * gsm_client_peek_app_id (GsmClient *client); + guint gsm_client_peek_restart_style_hint (GsmClient *client); + guint gsm_client_peek_status (GsmClient *client); + + + char *gsm_client_get_app_name (GsmClient *client); + void gsm_client_set_app_id (GsmClient *client, + const char *app_id); + void gsm_client_set_status (GsmClient *client, + guint status); + + gboolean gsm_client_end_session (GsmClient *client, + guint flags, + GError **error); + gboolean gsm_client_query_end_session (GsmClient *client, + guint flags, + GError **error); + gboolean gsm_client_cancel_end_session (GsmClient *client, + GError **error); + + void gsm_client_disconnected (GsmClient *client); + + gboolean gsm_client_request_save (GsmClient *client, + guint flags, + GError **error); + GKeyFile *gsm_client_save (GsmClient *client, ++ GsmApp *app, + GError **error); + + gboolean gsm_client_stop (GsmClient *client, + GError **error); + + /* private */ + + void gsm_client_end_session_response (GsmClient *client, + gboolean is_ok, + gboolean do_last, + gboolean cancel, + const char *reason); + + G_END_DECLS + + #endif /* __GSM_CLIENT_H__ */ +diff --git a/gnome-session/gsm-dbus-client.c b/gnome-session/gsm-dbus-client.c +index 050ea18f..5793f830 100644 +--- a/gnome-session/gsm-dbus-client.c ++++ b/gnome-session/gsm-dbus-client.c +@@ -315,60 +315,61 @@ gsm_dbus_client_finalize (GObject *object) + + if (client->priv->skeleton != NULL) { + g_dbus_interface_skeleton_unexport_from_connection (G_DBUS_INTERFACE_SKELETON (client->priv->skeleton), + client->priv->connection); + g_clear_object (&client->priv->skeleton); + } + + g_clear_object (&client->priv->connection); + + if (client->priv->watch_id != 0) + g_bus_unwatch_name (client->priv->watch_id); + + G_OBJECT_CLASS (gsm_dbus_client_parent_class)->finalize (object); + } + + static gboolean + dbus_client_request_save (GsmClient *client, + guint flags, + GError **error) + { + g_debug ("GsmDBusClient: sending save request to client with id %s", + gsm_client_peek_id (client)); + + /* FIXME: The protocol does not support this */ + + return FALSE; + } + + static GKeyFile * + dbus_client_save (GsmClient *client, ++ GsmApp *app, + GError **error) + { + g_debug ("GsmDBusClient: saving client with id %s", + gsm_client_peek_id (client)); + + /* FIXME: We still don't support client saving for D-Bus + * session clients */ + + return NULL; + } + + static gboolean + dbus_client_stop (GsmClient *client, + GError **error) + { + GsmDBusClient *dbus_client = (GsmDBusClient *) client; + gsm_exported_client_private_emit_stop (dbus_client->priv->skeleton); + return TRUE; + } + + static char * + dbus_client_get_app_name (GsmClient *client) + { + /* Always use app-id instead */ + return NULL; + } + + static GsmClientRestartStyle + dbus_client_get_restart_style_hint (GsmClient *client) + { +diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c +index 29c3054d..e7f0d7f8 100644 +--- a/gnome-session/gsm-manager.c ++++ b/gnome-session/gsm-manager.c +@@ -1260,61 +1260,61 @@ finish_pending_save_invocations (GsmManager *manager) + g_slist_free (manager->priv->pending_save_invocations); + manager->priv->pending_save_invocations = NULL; + } + + static void + query_save_session_complete (GsmManager *manager) + { + GError *error = NULL; + + if (g_slist_length (manager->priv->next_query_clients) > 0) { + ClientEndSessionData data; + + data.manager = manager; + data.flags = GSM_CLIENT_END_SESSION_FLAG_LAST; + + g_slist_foreach (manager->priv->next_query_clients, + (GFunc)_client_request_save, + &data); + + g_slist_free (manager->priv->next_query_clients); + manager->priv->next_query_clients = NULL; + + return; + } + + if (manager->priv->query_timeout_id > 0) { + g_source_remove (manager->priv->query_timeout_id); + manager->priv->query_timeout_id = 0; + } + +- gsm_session_save (manager->priv->clients, manager->priv->session_name, &error); ++ gsm_session_save (manager->priv->clients, manager->priv->apps, manager->priv->session_name, &error); + + if (error) { + g_warning ("Error saving session: %s", error->message); + fail_pending_save_invocations (manager, error); + g_error_free (error); + } else { + finish_pending_save_invocations (manager); + } + } + + static guint32 + generate_cookie (void) + { + guint32 cookie; + + cookie = (guint32)g_random_int_range (1, G_MAXINT32); + + return cookie; + } + + static guint32 + _generate_unique_cookie (GsmManager *manager) + { + guint32 cookie; + + do { + cookie = generate_cookie (); + } while (gsm_store_find (manager->priv->inhibitors, (GsmStoreFunc)_find_by_cookie, &cookie) != NULL); + + return cookie; +@@ -1963,61 +1963,61 @@ on_xsmp_client_register_confirmed (GsmXSMPClient *client, + } + } + + static gboolean + auto_save_is_enabled (GsmManager *manager) + { + return g_settings_get_boolean (manager->priv->settings, KEY_AUTOSAVE_ONE_SHOT) + || g_settings_get_boolean (manager->priv->settings, KEY_AUTOSAVE); + } + + static void + maybe_save_session (GsmManager *manager) + { + GError *error; + + if (gsm_system_is_login_session (manager->priv->system)) + return; + + /* We only allow session saving when session is running or when + * logging out */ + if (manager->priv->phase != GSM_MANAGER_PHASE_RUNNING && + manager->priv->phase != GSM_MANAGER_PHASE_END_SESSION) { + return; + } + + if (!auto_save_is_enabled (manager)) { + return; + } + + error = NULL; +- gsm_session_save (manager->priv->clients, manager->priv->session_name, &error); ++ gsm_session_save (manager->priv->clients, manager->priv->apps, manager->priv->session_name, &error); + + if (error) { + g_warning ("Error saving session: %s", error->message); + g_error_free (error); + } + } + + static void + _handle_client_end_session_response (GsmManager *manager, + GsmClient *client, + gboolean is_ok, + gboolean do_last, + gboolean cancel, + const char *reason) + { + /* just ignore if we are not yet running */ + if (manager->priv->phase < GSM_MANAGER_PHASE_RUNNING) { + return; + } + + g_debug ("GsmManager: Response from end session request: is-ok=%d do-last=%d cancel=%d reason=%s", is_ok, do_last, cancel, reason ? reason :""); + + if (manager->priv->phase == GSM_MANAGER_PHASE_RUNNING) { + /* Ignore responses when no requests were sent */ + if (manager->priv->query_clients == NULL) { + return; + } + + manager->priv->query_clients = g_slist_remove (manager->priv->query_clients, client); + +diff --git a/gnome-session/gsm-session-save.c b/gnome-session/gsm-session-save.c +index 78b64197..35ffaae0 100644 +--- a/gnome-session/gsm-session-save.c ++++ b/gnome-session/gsm-session-save.c +@@ -1,234 +1,253 @@ + /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * gsm-session-save.c + * Copyright (C) 2008 Lucas Rocha. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + + #include + + #include + + #include + #include + #include + ++#include "gsm-app.h" + #include "gsm-util.h" + #include "gsm-autostart-app.h" + #include "gsm-client.h" + + #include "gsm-session-save.h" + + #define GSM_MANAGER_SCHEMA "org.gnome.SessionManager" + #define KEY_AUTOSAVE_ONE_SHOT "auto-save-session-one-shot" + + + static gboolean gsm_session_clear_saved_session (const char *directory, + GHashTable *discard_hash); + + typedef struct { + char *dir; + GHashTable *discard_hash; ++ GsmStore *app_store; + GError **error; + } SessionSaveData; + + static void + clear_session_type (const char *save_dir) + { + char *file; + + file = g_build_filename (save_dir, "type", NULL); + + g_unlink (file); + + g_free (file); + } + + static void + set_session_type (const char *save_dir, + const char *type) + { + char *file; + GError *error; + + file = g_build_filename (save_dir, "type", NULL); + + error = NULL; + g_file_set_contents (file, type, strlen (type), &error); + if (error != NULL) + g_warning ("couldn't save session type to %s: %s", + type, error->message); + + g_free (file); + } + ++static gboolean ++_app_has_app_id (const char *id, ++ GsmApp *app, ++ const char *app_id_a) ++{ ++ const char *app_id_b; ++ ++ app_id_b = gsm_app_peek_app_id (app); ++ return g_strcmp0 (app_id_a, app_id_b) == 0; ++} ++ + static gboolean + save_one_client (char *id, + GObject *object, + SessionSaveData *data) + { + GsmClient *client; + GKeyFile *keyfile; ++ GsmApp *app = NULL; + const char *app_id; + char *path = NULL; + char *filename = NULL; + char *contents = NULL; + gsize length = 0; + char *discard_exec; + GError *local_error; + + client = GSM_CLIENT (object); + + local_error = NULL; + +- keyfile = gsm_client_save (client, &local_error); ++ app_id = gsm_client_peek_app_id (client); ++ if (!IS_STRING_EMPTY (app_id)) { ++ if (g_str_has_suffix (app_id, ".desktop")) ++ filename = g_strdup (app_id); ++ else ++ filename = g_strdup_printf ("%s.desktop", app_id); ++ ++ path = g_build_filename (data->dir, filename, NULL); ++ ++ app = (GsmApp *)gsm_store_find (data->app_store, ++ (GsmStoreFunc)_app_has_app_id, ++ (char *)app_id); ++ } ++ keyfile = gsm_client_save (client, app, &local_error); + + if (keyfile == NULL || local_error) { + goto out; + } + + contents = g_key_file_to_data (keyfile, &length, &local_error); + + if (local_error) { + goto out; + } + +- app_id = gsm_client_peek_app_id (client); +- if (!IS_STRING_EMPTY (app_id)) { +- if (g_str_has_suffix (app_id, ".desktop")) +- filename = g_strdup (app_id); +- else +- filename = g_strdup_printf ("%s.desktop", app_id); +- +- path = g_build_filename (data->dir, filename, NULL); +- } +- + if (!path || g_file_test (path, G_FILE_TEST_EXISTS)) { + if (filename) + g_free (filename); + if (path) + g_free (path); + + filename = g_strdup_printf ("%s.desktop", + gsm_client_peek_startup_id (client)); + path = g_build_filename (data->dir, filename, NULL); + } + + g_file_set_contents (path, + contents, + length, + &local_error); + + if (local_error) { + goto out; + } + + discard_exec = g_key_file_get_string (keyfile, + G_KEY_FILE_DESKTOP_GROUP, + GSM_AUTOSTART_APP_DISCARD_KEY, + NULL); + if (discard_exec) { + g_hash_table_insert (data->discard_hash, + discard_exec, discard_exec); + } + + g_debug ("GsmSessionSave: saved client %s to %s", id, filename); + + out: + if (keyfile != NULL) { + g_key_file_free (keyfile); + } + + g_free (contents); + g_free (filename); + g_free (path); + + /* in case of any error, stop saving session */ + if (local_error) { + g_propagate_error (data->error, local_error); + g_error_free (local_error); + + return TRUE; + } + + return FALSE; + } + + void + gsm_session_save (GsmStore *client_store, ++ GsmStore *app_store, + const char *type, + GError **error) + { + GSettings *settings; + const char *save_dir; + char *tmp_dir; + SessionSaveData data; + + g_debug ("GsmSessionSave: Saving session"); + + /* Clear one shot key autosave in the event its set (so that it's actually + * one shot only) + */ + settings = g_settings_new (GSM_MANAGER_SCHEMA); + g_settings_set_boolean (settings, KEY_AUTOSAVE_ONE_SHOT, FALSE); + g_object_unref (settings); + + save_dir = gsm_util_get_saved_session_dir (); + if (save_dir == NULL) { + g_warning ("GsmSessionSave: cannot create saved session directory"); + return; + } + + tmp_dir = gsm_util_get_empty_tmp_session_dir (); + if (tmp_dir == NULL) { + g_warning ("GsmSessionSave: cannot create new saved session directory"); + return; + } + + /* save the session in a temp directory, and remember the discard + * commands */ + data.dir = tmp_dir; + data.discard_hash = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, NULL); + data.error = error; ++ data.app_store = app_store; + + gsm_store_foreach (client_store, + (GsmStoreFunc) save_one_client, + &data); + + if (!*error) { + char *session_dir; + + if (g_file_test (save_dir, G_FILE_TEST_IS_SYMLINK)) + session_dir = g_file_read_link (save_dir, error); + else + session_dir = g_strdup (save_dir); + + if (session_dir != NULL) { + char *absolute_session_dir; + + set_session_type (tmp_dir, type); + + if (g_path_is_absolute (session_dir)) { + absolute_session_dir = g_strdup (session_dir); + } else { + char *parent_dir; + + parent_dir = g_path_get_dirname (save_dir); + absolute_session_dir = g_build_filename (parent_dir, session_dir, NULL); + g_free (parent_dir); + } + g_free (session_dir); + + /* remove the old saved session */ +diff --git a/gnome-session/gsm-session-save.h b/gnome-session/gsm-session-save.h +index c91b5615..b32673c4 100644 +--- a/gnome-session/gsm-session-save.h ++++ b/gnome-session/gsm-session-save.h +@@ -1,34 +1,35 @@ + /* gsm-session-save.h + * Copyright (C) 2008 Lucas Rocha. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + + #ifndef __GSM_SESSION_SAVE_H__ + #define __GSM_SESSION_SAVE_H__ + + #include + + #include "gsm-store.h" + + G_BEGIN_DECLS + + void gsm_session_save (GsmStore *client_store, ++ GsmStore *app_store, + const char *type, + GError **error); + void gsm_session_save_clear (void); + + G_END_DECLS + + #endif /* __GSM_SESSION_SAVE_H__ */ +diff --git a/gnome-session/gsm-xsmp-client.c b/gnome-session/gsm-xsmp-client.c +index 2846d9b3..cbecd68c 100644 +--- a/gnome-session/gsm-xsmp-client.c ++++ b/gnome-session/gsm-xsmp-client.c +@@ -612,118 +612,127 @@ set_desktop_file_keys_from_client (GsmClient *client, + + g_free (comment); + } + + static GKeyFile * + create_client_key_file (GsmClient *client, + const char *desktop_file_path, + GError **error) { + GKeyFile *keyfile; + + keyfile = g_key_file_new (); + + if (desktop_file_path != NULL) { + g_key_file_load_from_file (keyfile, + desktop_file_path, + G_KEY_FILE_KEEP_COMMENTS | + G_KEY_FILE_KEEP_TRANSLATIONS, + error); + } else { + set_desktop_file_keys_from_client (client, keyfile); + } + + return keyfile; + } + + static GsmClientRestartStyle + xsmp_get_restart_style_hint (GsmClient *client); + + static GKeyFile * + xsmp_save (GsmClient *client, ++ GsmApp *app, + GError **error) + { + GsmClientRestartStyle restart_style; + + GKeyFile *keyfile = NULL; + char *desktop_file_path = NULL; + char *exec_program = NULL; + char *exec_discard = NULL; + char *startup_id = NULL; + GError *local_error; + + g_debug ("GsmXSMPClient: saving client with id %s", + gsm_client_peek_id (client)); + + local_error = NULL; + + restart_style = xsmp_get_restart_style_hint (client); + if (restart_style == GSM_CLIENT_RESTART_NEVER) { + goto out; + } + + exec_program = xsmp_get_restart_command (client); + if (!exec_program) { + goto out; + } + + desktop_file_path = get_desktop_file_path (GSM_XSMP_CLIENT (client)); + + /* this can accept desktop_file_path == NULL */ + keyfile = create_client_key_file (client, + desktop_file_path, + &local_error); + + if (local_error) { + goto out; + } + + g_object_get (client, + "startup-id", &startup_id, + NULL); + + g_key_file_set_string (keyfile, + G_KEY_FILE_DESKTOP_GROUP, + GSM_AUTOSTART_APP_STARTUP_ID_KEY, + startup_id); + + g_key_file_set_string (keyfile, + G_KEY_FILE_DESKTOP_GROUP, + G_KEY_FILE_DESKTOP_KEY_EXEC, + exec_program); + + exec_discard = xsmp_get_discard_command (client); + if (exec_discard) + g_key_file_set_string (keyfile, + G_KEY_FILE_DESKTOP_GROUP, + GSM_AUTOSTART_APP_DISCARD_KEY, + exec_discard); + ++ if (app != NULL) { ++ gsm_app_save_to_keyfile (app, keyfile, &local_error); ++ ++ if (local_error) { ++ goto out; ++ } ++ } ++ + out: + g_free (desktop_file_path); + g_free (exec_program); + g_free (exec_discard); + g_free (startup_id); + + if (local_error != NULL) { + g_propagate_error (error, local_error); + g_key_file_free (keyfile); + + return NULL; + } + + return keyfile; + } + + static gboolean + xsmp_stop (GsmClient *client, + GError **error) + { + GsmXSMPClient *xsmp = (GsmXSMPClient *) client; + + g_debug ("GsmXSMPClient: xsmp_stop ('%s')", xsmp->priv->description); + + if (xsmp->priv->conn == NULL) { + g_set_error (error, + GSM_CLIENT_ERROR, + GSM_CLIENT_ERROR_NOT_REGISTERED, + "Client is not registered"); + return FALSE; +-- +2.14.3 + diff --git a/SOURCES/0002-Revert-Remove-gnome-session-properties.patch b/SOURCES/0002-Revert-Remove-gnome-session-properties.patch index 781c171..05d282b 100644 --- a/SOURCES/0002-Revert-Remove-gnome-session-properties.patch +++ b/SOURCES/0002-Revert-Remove-gnome-session-properties.patch @@ -1,4 +1,4 @@ -From a4d8ac3f6c392416b2569b4617ab6ef4a64d53b7 Mon Sep 17 00:00:00 2001 +From e18747f7c52f7d7d56f7d9490f934d59d84f8af9 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 8 May 2015 16:24:59 -0400 Subject: [PATCH 02/19] Revert "Remove gnome-session-properties" @@ -19,12 +19,12 @@ This reverts commit ea285af9962313ee2675fff27d3a852bb61e936a. capplet/gsp-keyfile.h | 65 ++ capplet/main.c | 108 +++ configure.ac | 2 + - data/Makefile.am | 6 + + data/Makefile.am | 8 +- data/gnome-session-properties.desktop.in.in | 15 + doc/man/Makefile.am | 1 + doc/man/gnome-session-properties.1 | 24 + po/POTFILES.in | 5 + - 19 files changed, 3780 insertions(+) + 19 files changed, 3781 insertions(+), 1 deletion(-) create mode 100644 capplet/Makefile.am create mode 100644 capplet/gsm-app-dialog.c create mode 100644 capplet/gsm-app-dialog.h @@ -3877,7 +3877,7 @@ index 00000000..3c7177bc + return 0; +} diff --git a/configure.ac b/configure.ac -index 776c8208..47caf9c8 100644 +index f57dcf3d..b3f285ed 100644 --- a/configure.ac +++ b/configure.ac @@ -337,65 +337,67 @@ if test $enable_ipv6 = yes; then @@ -3949,10 +3949,10 @@ index 776c8208..47caf9c8 100644 sysconfdir: ${sysconfdir} localstatedir: ${localstatedir} diff --git a/data/Makefile.am b/data/Makefile.am -index a171dfcb..6167d10f 100644 +index 413279a2..b5c3f5ec 100644 --- a/data/Makefile.am +++ b/data/Makefile.am -@@ -1,68 +1,74 @@ +@@ -1,67 +1,73 @@ SUBDIRS = icons uidir = $(pkgdatadir) @@ -4022,9 +4022,9 @@ index a171dfcb..6167d10f 100644 $(session_DATA) DISTCLEANFILES = \ - $(gsettings_SCHEMAS) \ -+ $(desktop_in_files) \ - $(wayland_session_in_files) +- $(gsettings_SCHEMAS) ++ $(gsettings_SCHEMAS) \ ++ $(desktop_in_files) -include $(top_srcdir)/git.mk diff --git a/data/gnome-session-properties.desktop.in.in b/data/gnome-session-properties.desktop.in.in @@ -4143,5 +4143,5 @@ index 76882645..5cb5123d 100644 tools/gnome-session-selector.c tools/gnome-session-quit.c -- -2.12.0 +2.14.2 diff --git a/SOURCES/0002-autostart-ensure-gnome-shell-and-mutter-get-right-au.patch b/SOURCES/0002-autostart-ensure-gnome-shell-and-mutter-get-right-au.patch new file mode 100644 index 0000000..6784c45 --- /dev/null +++ b/SOURCES/0002-autostart-ensure-gnome-shell-and-mutter-get-right-au.patch @@ -0,0 +1,96 @@ +From 622e54d54c65eba7c5d8e4172f8aae8a970126f9 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Thu, 18 Jan 2018 10:09:36 -0500 +Subject: [PATCH 2/2] autostart: ensure gnome-shell and mutter get right + autostart phase + +Previous versions of gnome-shell neglected to save the autostart phases +for required components in the session state. While that is now fixed, +users may still have old saved state that lack the autostart phase. + +In order to ease upgrades, this commit manually adds in the phases that +are important for a functioning GNOME desktop. +--- + gnome-session/gsm-autostart-app.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/gnome-session/gsm-autostart-app.c b/gnome-session/gsm-autostart-app.c +index 9eb1db5b..5617e549 100644 +--- a/gnome-session/gsm-autostart-app.c ++++ b/gnome-session/gsm-autostart-app.c +@@ -621,61 +621,71 @@ load_desktop_file (GsmAutostartApp *app) + char *startup_id; + char *phase_str; + int phase; + gboolean res; + + g_assert (app->priv->app_info != NULL); + + phase_str = g_desktop_app_info_get_string (app->priv->app_info, + GSM_AUTOSTART_APP_PHASE_KEY); + if (phase_str != NULL) { + if (strcmp (phase_str, "EarlyInitialization") == 0) { + phase = GSM_MANAGER_PHASE_EARLY_INITIALIZATION; + } else if (strcmp (phase_str, "PreDisplayServer") == 0) { + phase = GSM_MANAGER_PHASE_PRE_DISPLAY_SERVER; + } else if (strcmp (phase_str, "DisplayServer") == 0) { + phase = GSM_MANAGER_PHASE_DISPLAY_SERVER; + } else if (strcmp (phase_str, "Initialization") == 0) { + phase = GSM_MANAGER_PHASE_INITIALIZATION; + } else if (strcmp (phase_str, "WindowManager") == 0) { + phase = GSM_MANAGER_PHASE_WINDOW_MANAGER; + } else if (strcmp (phase_str, "Panel") == 0) { + phase = GSM_MANAGER_PHASE_PANEL; + } else if (strcmp (phase_str, "Desktop") == 0) { + phase = GSM_MANAGER_PHASE_DESKTOP; + } else { + phase = GSM_MANAGER_PHASE_APPLICATION; + } + + g_free (phase_str); + } else { +- phase = GSM_MANAGER_PHASE_APPLICATION; ++ const char *app_id; ++ ++ app_id = g_app_info_get_id (G_APP_INFO (app->priv->app_info)); ++ ++ /* These hardcoded checks are to keep upgrades working */ ++ if (app_id != NULL && g_str_has_prefix (app_id, "org.gnome.Shell")) ++ phase = GSM_MANAGER_PHASE_DISPLAY_SERVER; ++ else if (app_id != NULL && g_str_has_prefix (app_id, "org.gnome.SettingsDaemon")) ++ phase = GSM_MANAGER_PHASE_INITIALIZATION; ++ else ++ phase = GSM_MANAGER_PHASE_APPLICATION; + } + + dbus_name = g_desktop_app_info_get_string (app->priv->app_info, + GSM_AUTOSTART_APP_DBUS_NAME_KEY); + if (dbus_name != NULL) { + app->priv->launch_type = AUTOSTART_LAUNCH_ACTIVATE; + } else { + app->priv->launch_type = AUTOSTART_LAUNCH_SPAWN; + } + + /* this must only be done on first load */ + switch (app->priv->launch_type) { + case AUTOSTART_LAUNCH_SPAWN: + startup_id = + g_desktop_app_info_get_string (app->priv->app_info, + GSM_AUTOSTART_APP_STARTUP_ID_KEY); + + if (startup_id == NULL) { + startup_id = gsm_util_generate_startup_id (); + } + break; + case AUTOSTART_LAUNCH_ACTIVATE: + startup_id = g_strdup (dbus_name); + break; + default: + g_assert_not_reached (); + } + + res = g_desktop_app_info_has_key (app->priv->app_info, + GSM_AUTOSTART_APP_AUTORESTART_KEY); +-- +2.14.3 + diff --git a/SOURCES/0003-Revert-Rename-the-desktop-file-to-gnome-session-prop.patch b/SOURCES/0003-Revert-Rename-the-desktop-file-to-gnome-session-prop.patch index 51b9a1e..d52b1be 100644 --- a/SOURCES/0003-Revert-Rename-the-desktop-file-to-gnome-session-prop.patch +++ b/SOURCES/0003-Revert-Rename-the-desktop-file-to-gnome-session-prop.patch @@ -1,4 +1,4 @@ -From 99d31512307576e9c06a201728eaa023718d3db7 Mon Sep 17 00:00:00 2001 +From 808e1598dc50484f62998b4a9e94e956f028d362 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 8 May 2015 16:27:15 -0400 Subject: [PATCH 03/19] Revert "Rename the desktop file to @@ -15,7 +15,7 @@ This reverts commit ac9fd0dc97a17674cb082f80df0b1fcc45bc92bf. rename data/{gnome-session-properties.desktop.in.in => session-properties.desktop.in.in} (100%) diff --git a/configure.ac b/configure.ac -index 47caf9c8..cc554a8a 100644 +index b3f285ed..5182c09e 100644 --- a/configure.ac +++ b/configure.ac @@ -343,61 +343,61 @@ if test $enable_ipv6 = yes; then @@ -82,7 +82,7 @@ index 47caf9c8..cc554a8a 100644 sysconfdir: ${sysconfdir} localstatedir: ${localstatedir} diff --git a/data/Makefile.am b/data/Makefile.am -index 6167d10f..e8a0e05e 100644 +index b5c3f5ec..0bb25c06 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,58 +1,58 @@ @@ -191,5 +191,5 @@ index 91b41569..e6470914 100644 data/gnome.session.desktop.in +data/session-properties.desktop.in -- -2.12.0 +2.14.2 diff --git a/SOURCES/0004-stop-using-gsm_util_get_current_desktop.patch b/SOURCES/0004-stop-using-gsm_util_get_current_desktop.patch index 748a4dc..67eb7e8 100644 --- a/SOURCES/0004-stop-using-gsm_util_get_current_desktop.patch +++ b/SOURCES/0004-stop-using-gsm_util_get_current_desktop.patch @@ -1,4 +1,4 @@ -From 5732c282f1cb2f485bd1d3a7b0ce391ab7709d81 Mon Sep 17 00:00:00 2001 +From 2a087ede1b20e8dcac1c37c0b280f9bf6be7c93b Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 13 May 2015 10:56:09 -0400 Subject: [PATCH 04/19] stop using gsm_util_get_current_desktop @@ -437,5 +437,5 @@ index c92b8dad..123ab217 100644 char *filename; char *basename; -- -2.12.0 +2.14.2 diff --git a/SOURCES/0005-session-properties-get-out-of-Other.patch b/SOURCES/0005-session-properties-get-out-of-Other.patch index f63298c..cc10d03 100644 --- a/SOURCES/0005-session-properties-get-out-of-Other.patch +++ b/SOURCES/0005-session-properties-get-out-of-Other.patch @@ -1,4 +1,4 @@ -From d53180ebccd678fae1da76d1defb05a9c73e92fe Mon Sep 17 00:00:00 2001 +From 119ac97cea3b362e53aaa236f643f9bb916a03cb Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 15:07:35 -0500 Subject: [PATCH 05/19] session-properties: get out of Other @@ -30,5 +30,5 @@ index 3dc7b033..dcfe2f84 100644 X-GNOME-Bugzilla-Component=gnome-session-properties X-GNOME-Bugzilla-Version=@VERSION@ -- -2.12.0 +2.14.2 diff --git a/SOURCES/0006-session-properties-refresh-from-recent-glade.patch b/SOURCES/0006-session-properties-refresh-from-recent-glade.patch index 29a8281..036e50b 100644 --- a/SOURCES/0006-session-properties-refresh-from-recent-glade.patch +++ b/SOURCES/0006-session-properties-refresh-from-recent-glade.patch @@ -1,4 +1,4 @@ -From faf13c2b486153683337064824712a440b158424 Mon Sep 17 00:00:00 2001 +From 805c9f995da83c173f9323f55a3f26b627410553 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 10:53:33 -0500 Subject: [PATCH 06/19] session-properties: refresh from recent glade @@ -373,5 +373,5 @@ index 1f0cb9a5..47a30f78 100644 -- -2.12.0 +2.14.2 diff --git a/SOURCES/0007-manager-Don-t-clear-saved-session-if-autosaving-is-d.patch b/SOURCES/0007-manager-Don-t-clear-saved-session-if-autosaving-is-d.patch index 8147c53..a2cd28a 100644 --- a/SOURCES/0007-manager-Don-t-clear-saved-session-if-autosaving-is-d.patch +++ b/SOURCES/0007-manager-Don-t-clear-saved-session-if-autosaving-is-d.patch @@ -1,4 +1,4 @@ -From b8e1b19177e1bbe866ed5561880eaaa7852d31dd Mon Sep 17 00:00:00 2001 +From eb9b29eeb55c47d691b65b046e31ede815e3d22c Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 16:14:16 -0500 Subject: [PATCH 07/19] manager: Don't clear saved session if autosaving is @@ -11,10 +11,10 @@ we don't wipe that away at log out. 1 file changed, 1 deletion(-) diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index 012f3d3f..ce2ffbcf 100644 +index bdba38e8..e2fad3b1 100644 --- a/gnome-session/gsm-manager.c +++ b/gnome-session/gsm-manager.c -@@ -1790,61 +1790,60 @@ on_xsmp_client_register_confirmed (GsmXSMPClient *client, +@@ -1828,61 +1828,60 @@ on_xsmp_client_register_confirmed (GsmXSMPClient *client, app = find_app_for_startup_id (manager, id); if (app != NULL) { @@ -77,5 +77,5 @@ index 012f3d3f..ce2ffbcf 100644 cancel_end_session (manager); return; -- -2.12.0 +2.14.2 diff --git a/SOURCES/0008-Add-Remember-Currently-Running-Applications-button.patch b/SOURCES/0008-Add-Remember-Currently-Running-Applications-button.patch index 6e38896..c9ec2ac 100644 --- a/SOURCES/0008-Add-Remember-Currently-Running-Applications-button.patch +++ b/SOURCES/0008-Add-Remember-Currently-Running-Applications-button.patch @@ -1,4 +1,4 @@ -From 0399cc2e36daaec2ea70c0f32866fb37f08ad4b2 Mon Sep 17 00:00:00 2001 +From cae19300c8035b84c71f6ba5fb17d86add2465dd Mon Sep 17 00:00:00 2001 From: Josselin Mouette Date: Mon, 21 Jun 2010 15:22:23 -0400 Subject: [PATCH 08/19] Add "Remember Currently Running Applications" button @@ -100,7 +100,8 @@ index 33812b8b..d2be778b 100644 STORE_COL_DESCRIPTION, STORE_COL_APP, STORE_COL_SEARCH, -@@ -431,64 +438,118 @@ on_edit_app_clicked (GtkWidget *widget, +@@ -430,65 +437,119 @@ on_edit_app_clicked (GtkWidget *widget, + char *exec; char *comment; edit_dialog = gsm_app_dialog_new (gsp_app_get_name (app), @@ -130,7 +131,7 @@ index 33812b8b..d2be778b 100644 on_edit_app_clicked (NULL, dialog); } - static void ++static void +session_saved_message (GsmPropertiesDialog *dialog, + const char *msg, + gboolean is_error) @@ -163,7 +164,7 @@ index 33812b8b..d2be778b 100644 + g_object_unref (proxy); +} + -+static void + static void on_save_session_clicked (GtkWidget *widget, GsmPropertiesDialog *dialog) { @@ -221,7 +222,7 @@ index 33812b8b..d2be778b 100644 gtk_tree_model_filter_set_visible_column (GTK_TREE_MODEL_FILTER (tree_filter), diff --git a/configure.ac b/configure.ac -index cc554a8a..04a25fc8 100644 +index 5182c09e..73e69bc7 100644 --- a/configure.ac +++ b/configure.ac @@ -51,60 +51,61 @@ if test "$enable_session_selector" = yes; then @@ -274,16 +275,16 @@ index cc554a8a..04a25fc8 100644 [enable_gconf=$enableval], [enable_gconf=auto]) - PKG_CHECK_MODULES(GCONF, gconf-2.0, [have_gconf=yes], [have_gconf=no]) + if test x$enable_gconf != xno ; then + PKG_CHECK_MODULES(GCONF, gconf-2.0, [have_gconf=yes], [have_gconf=no]) - if test x$enable_gconf = xauto ; then - enable_gconf=$have_gconf - elif test x$enable_gconf = xyes -a x$have_gconf = xno ; then - AC_MSG_ERROR([GConf support explicitly required, but gconf not found]) - fi + if test x$enable_gconf = xyes -a x$have_gconf = xno ; then + AC_MSG_ERROR([GConf support explicitly required, but gconf not found]) + fi - if test x$enable_gconf = xyes ; then - AC_DEFINE([HAVE_GCONF], [1], [Define if we support gconf-based autostart]) + if test x$have_gconf = xyes ; then + AC_DEFINE([HAVE_GCONF], [1], [Define if we support gconf-based autostart]) + fi fi diff --git a/data/session-properties.ui b/data/session-properties.ui @@ -576,10 +577,10 @@ index cd7c06d8..f79896b3 100644 #endif /* __GSM_CLIENT_H__ */ diff --git a/gnome-session/gsm-dbus-client.c b/gnome-session/gsm-dbus-client.c -index 6f5099f9..3c5f7504 100644 +index dcf96f0b..050ea18f 100644 --- a/gnome-session/gsm-dbus-client.c +++ b/gnome-session/gsm-dbus-client.c -@@ -299,60 +299,73 @@ gsm_dbus_client_get_property (GObject *object, +@@ -300,60 +300,73 @@ gsm_dbus_client_get_property (GObject *object, case PROP_BUS_NAME: g_value_set_string (value, self->priv->bus_name); break; @@ -653,7 +654,7 @@ index 6f5099f9..3c5f7504 100644 } static GsmClientRestartStyle -@@ -392,60 +405,61 @@ static gboolean +@@ -393,60 +406,61 @@ static gboolean dbus_client_end_session (GsmClient *client, GsmClientEndSessionFlag flags, GError **error) @@ -716,7 +717,7 @@ index 6f5099f9..3c5f7504 100644 "bus-name", bus_name, NULL); diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index ce2ffbcf..711961d6 100644 +index e2fad3b1..825a6846 100644 --- a/gnome-session/gsm-manager.c +++ b/gnome-session/gsm-manager.c @@ -54,60 +54,61 @@ @@ -781,7 +782,7 @@ index ce2ffbcf..711961d6 100644 GSM_MANAGER_LOGOUT_REBOOT, GSM_MANAGER_LOGOUT_REBOOT_INTERACT, GSM_MANAGER_LOGOUT_SHUTDOWN, -@@ -1134,60 +1135,123 @@ end_session_or_show_shell_dialog (GsmManager *manager) +@@ -1172,60 +1173,123 @@ end_session_or_show_shell_dialog (GsmManager *manager) end_phase (manager); } break; @@ -905,7 +906,7 @@ index ce2ffbcf..711961d6 100644 manager->priv->query_timeout_id = 0; g_debug ("GsmManager: query end session timed out"); -@@ -1214,60 +1278,75 @@ _on_query_end_session_timeout (GsmManager *manager) +@@ -1252,60 +1316,75 @@ _on_query_end_session_timeout (GsmManager *manager) bus_name = NULL; } @@ -981,7 +982,7 @@ index ce2ffbcf..711961d6 100644 } static void -@@ -1810,67 +1889,86 @@ maybe_save_session (GsmManager *manager) +@@ -1848,67 +1927,86 @@ maybe_save_session (GsmManager *manager) return; /* We only allow session saving when session is running or when @@ -1070,7 +1071,8 @@ index ce2ffbcf..711961d6 100644 } cookie = _generate_unique_cookie (manager); -@@ -1931,84 +2029,97 @@ on_client_end_session_response (GsmClient *client, +@@ -1968,85 +2066,98 @@ on_client_end_session_response (GsmClient *client, + _handle_client_end_session_response (manager, client, is_ok, do_last, @@ -1100,7 +1102,7 @@ index ce2ffbcf..711961d6 100644 } } - static void ++static void +on_xsmp_client_save_request (GsmXSMPClient *client, + gboolean show_dialog, + GsmManager *manager) @@ -1109,7 +1111,7 @@ index ce2ffbcf..711961d6 100644 + gsm_manager_save_session (manager, NULL); +} + -+static void + static void on_store_client_added (GsmStore *store, const char *id, GsmManager *manager) @@ -1168,7 +1170,8 @@ index ce2ffbcf..711961d6 100644 if (store != NULL) { g_object_ref (store); } -@@ -2588,60 +2699,95 @@ gsm_manager_initialization_error (GsmExportedManager *skeleton, +@@ -2625,60 +2736,95 @@ gsm_manager_initialization_error (GsmExportedManager *skeleton, + gboolean fatal, GsmManager *manager) { if (manager->priv->phase != GSM_MANAGER_PHASE_INITIALIZATION) { @@ -1198,7 +1201,7 @@ index ce2ffbcf..711961d6 100644 request_logout (manager, mode); } - gboolean ++gboolean +gsm_manager_save_session (GsmManager *manager, + GError **error) +{ @@ -1233,7 +1236,7 @@ index ce2ffbcf..711961d6 100644 + } +} + -+gboolean + gboolean gsm_manager_logout (GsmManager *manager, guint logout_mode, GError **error) @@ -1263,7 +1266,6 @@ index ce2ffbcf..711961d6 100644 default: g_debug ("Unknown logout mode option"); - diff --git a/gnome-session/gsm-manager.h b/gnome-session/gsm-manager.h index bc440cb0..4d14aa34 100644 --- a/gnome-session/gsm-manager.h @@ -1718,5 +1720,5 @@ index 580ec356..29eb0990 100644 Normal. -- -2.12.0 +2.14.2 diff --git a/SOURCES/0009-Revert-Allow-saved-session-to-be-a-symlink.patch b/SOURCES/0009-Revert-Allow-saved-session-to-be-a-symlink.patch index 72da3d4..2cb0afd 100644 --- a/SOURCES/0009-Revert-Allow-saved-session-to-be-a-symlink.patch +++ b/SOURCES/0009-Revert-Allow-saved-session-to-be-a-symlink.patch @@ -1,4 +1,4 @@ -From 43ef133022ec1c25d1626a58fd8c3c8349d5d041 Mon Sep 17 00:00:00 2001 +From abf8b3509a0debaf124669d9626a6d9883a1a0d3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 11:22:07 -0500 Subject: [PATCH 09/19] Revert "Allow saved-session to be a symlink" @@ -194,7 +194,7 @@ index d6000e09..eebc5ff1 100644 goto out; diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c -index e30cf912..13f674cb 100644 +index 4772c6e6..30edb577 100644 --- a/gnome-session/gsm-util.c +++ b/gnome-session/gsm-util.c @@ -71,63 +71,69 @@ gsm_util_find_desktop_file_for_app_name (const char *name, @@ -268,5 +268,5 @@ index e30cf912..13f674cb 100644 if (dir) { while ((filename = g_dir_read_name (dir))) { -- -2.12.0 +2.14.2 diff --git a/SOURCES/0010-Allow-saved-session-directory-to-be-a-symlink.patch b/SOURCES/0010-Allow-saved-session-directory-to-be-a-symlink.patch index 67457e9..c026ffa 100644 --- a/SOURCES/0010-Allow-saved-session-directory-to-be-a-symlink.patch +++ b/SOURCES/0010-Allow-saved-session-directory-to-be-a-symlink.patch @@ -1,4 +1,4 @@ -From 6a7054d12d1177184ed20f1d2263eef476d25b8f Mon Sep 17 00:00:00 2001 +From 7c05176e0db2b4d00971a5baf940ad075a088c70 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 11:22:53 -0500 Subject: [PATCH 10/19] Allow saved-session directory to be a symlink @@ -113,7 +113,7 @@ index eebc5ff1..66914b57 100644 int argc; diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c -index 13f674cb..e30cf912 100644 +index 30edb577..4772c6e6 100644 --- a/gnome-session/gsm-util.c +++ b/gnome-session/gsm-util.c @@ -71,69 +71,63 @@ gsm_util_find_desktop_file_for_app_name (const char *name, @@ -187,5 +187,5 @@ index 13f674cb..e30cf912 100644 if (dir) { while ((filename = g_dir_read_name (dir))) { -- -2.12.0 +2.14.2 diff --git a/SOURCES/0011-Tie-session-selector-to-properties-dialog.patch b/SOURCES/0011-Tie-session-selector-to-properties-dialog.patch index bfa64ca..fc1e2ce 100644 --- a/SOURCES/0011-Tie-session-selector-to-properties-dialog.patch +++ b/SOURCES/0011-Tie-session-selector-to-properties-dialog.patch @@ -1,4 +1,4 @@ -From 9b75d5137aea0a54d8e04f55e31d63e5fa250fc8 Mon Sep 17 00:00:00 2001 +From 63b277e801d8bce92abe4e52f7de4cf059f1f896 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 11:28:53 -0500 Subject: [PATCH 11/19] Tie session selector to properties dialog @@ -15,7 +15,7 @@ diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c index d2be778b..51fa5106 100644 --- a/capplet/gsm-properties-dialog.c +++ b/capplet/gsm-properties-dialog.c -@@ -471,88 +471,114 @@ session_saved_message (GsmPropertiesDialog *dialog, +@@ -471,87 +471,113 @@ session_saved_message (GsmPropertiesDialog *dialog, { GtkLabel *label; gchar *markup; @@ -74,7 +74,7 @@ index d2be778b..51fa5106 100644 } } - static void ++static void +save_session_from_selector (GsmPropertiesDialog *dialog, + const char *program_path) +{ @@ -101,7 +101,7 @@ index d2be778b..51fa5106 100644 + } +} + -+static void + static void setup_dialog (GsmPropertiesDialog *dialog) { GtkTreeView *treeview; @@ -131,9 +131,8 @@ index d2be778b..51fa5106 100644 gtk_tree_model_filter_set_visible_column (GTK_TREE_MODEL_FILTER (tree_filter), STORE_COL_VISIBLE); - treeview = GTK_TREE_VIEW (gtk_builder_get_object (dialog->priv->xml, diff --git a/configure.ac b/configure.ac -index 04a25fc8..ccbbf970 100644 +index 73e69bc7..d0eeab8a 100644 --- a/configure.ac +++ b/configure.ac @@ -21,91 +21,90 @@ LT_PREREQ([2.2.6]) @@ -217,16 +216,16 @@ index 04a25fc8..ccbbf970 100644 [enable_gconf=$enableval], [enable_gconf=auto]) - PKG_CHECK_MODULES(GCONF, gconf-2.0, [have_gconf=yes], [have_gconf=no]) + if test x$enable_gconf != xno ; then + PKG_CHECK_MODULES(GCONF, gconf-2.0, [have_gconf=yes], [have_gconf=no]) - if test x$enable_gconf = xauto ; then - enable_gconf=$have_gconf - elif test x$enable_gconf = xyes -a x$have_gconf = xno ; then - AC_MSG_ERROR([GConf support explicitly required, but gconf not found]) - fi + if test x$enable_gconf = xyes -a x$have_gconf = xno ; then + AC_MSG_ERROR([GConf support explicitly required, but gconf not found]) + fi - if test x$enable_gconf = xyes ; then - AC_DEFINE([HAVE_GCONF], [1], [Define if we support gconf-based autostart]) + if test x$have_gconf = xyes ; then + AC_DEFINE([HAVE_GCONF], [1], [Define if we support gconf-based autostart]) + fi fi diff --git a/data/session-selector.ui b/data/session-selector.ui @@ -340,7 +339,7 @@ index d3b8bf3f..d6784d1b 100644 -include $(top_srcdir)/git.mk diff --git a/tools/gnome-session-selector.c b/tools/gnome-session-selector.c -index d7584ffb..8f37eca4 100644 +index 71892c43..53822f6c 100644 --- a/tools/gnome-session-selector.c +++ b/tools/gnome-session-selector.c @@ -7,126 +7,133 @@ @@ -453,15 +452,15 @@ index d7584ffb..8f37eca4 100644 if (user_tried_dot && user_tried_slash) { warning_text = g_strdup_printf ("%s\nNote: %s", info_text, - _("Session names are not allowed to start with ‘.’ or contain ‘/’ characters")); + _("Session names are not allowed to start with “.” or contain “/” characters")); } else if (user_tried_dot) { warning_text = g_strdup_printf ("%s\nNote: %s", info_text, - _("Session names are not allowed to start with ‘.’")); + _("Session names are not allowed to start with “.”")); } else if (user_tried_slash) { warning_text = g_strdup_printf ("%s\nNote: %s", info_text, - _("Session names are not allowed to contain ‘/’ characters")); + _("Session names are not allowed to contain “/” characters")); } gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); @@ -469,7 +468,7 @@ index d7584ffb..8f37eca4 100644 gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, 0, &n, -1); if (strcmp (n, name) == 0) { char *message; - message = g_strdup_printf (_("A session named ‘%s’ already exists"), name); + message = g_strdup_printf (_("A session named “%s” already exists"), name); warning_text = g_strdup_printf ("%s\nNote: %s", info_text, message); g_free (message); g_free (n); @@ -479,7 +478,8 @@ index d7584ffb..8f37eca4 100644 } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter)); info_bar = (GtkWidget *) gtk_builder_get_object (builder, "info-bar"); -@@ -182,517 +189,637 @@ populate_session_list (GtkWidget *session_list) +@@ -181,518 +188,638 @@ populate_session_list (GtkWidget *session_list) + default_name = NULL; if (readlink (saved_session, last_session, PATH_MAX - 1) > 0) { default_name = g_path_get_basename (last_session); @@ -509,7 +509,7 @@ index d7584ffb..8f37eca4 100644 g_free (path); } - static char * ++static char * +get_last_session (void) +{ + char *saved_session; @@ -527,7 +527,7 @@ index d7584ffb..8f37eca4 100644 + return name; +} + -+static char * + static char * get_selected_session (void) { GtkTreeSelection *selection; @@ -737,7 +737,7 @@ index d7584ffb..8f37eca4 100644 return result == 0; } - static gboolean +-static gboolean -make_session_current (const char *name) -{ - char *path1; @@ -756,7 +756,7 @@ index d7584ffb..8f37eca4 100644 - return ret; -} - --static gboolean + static gboolean create_and_select_session (const char *name) { gchar *path; @@ -820,14 +820,14 @@ index d7584ffb..8f37eca4 100644 begin_rename (); } - static void ++static void +on_new_session_clicked (GtkButton *button, + gpointer data) +{ + create_session_and_begin_rename (); +} + -+static void + static void on_selection_changed (GtkTreeSelection *selection, gpointer data) { @@ -1158,5 +1158,5 @@ index d7584ffb..8f37eca4 100644 return 0; } -- -2.12.0 +2.14.2 diff --git a/SOURCES/0012-make-save-session-stall-until-it-finishes.patch b/SOURCES/0012-make-save-session-stall-until-it-finishes.patch index 06680c0..5267a52 100644 --- a/SOURCES/0012-make-save-session-stall-until-it-finishes.patch +++ b/SOURCES/0012-make-save-session-stall-until-it-finishes.patch @@ -1,4 +1,4 @@ -From 92c8574d86c70e8a595dfbfdab461c7b990d2fe1 Mon Sep 17 00:00:00 2001 +From 7553acfe86151ed6bc6649f3e16e2a42c6435930 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 11:32:52 -0500 Subject: [PATCH 12/19] make save-session stall until it finishes @@ -10,7 +10,7 @@ Subject: [PATCH 12/19] make save-session stall until it finishes 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index 711961d6..3c6bb7f4 100644 +index 825a6846..6630aab8 100644 --- a/gnome-session/gsm-manager.c +++ b/gnome-session/gsm-manager.c @@ -113,60 +113,61 @@ typedef enum @@ -75,7 +75,8 @@ index 711961d6..3c6bb7f4 100644 enum { PROP_0, -@@ -1165,90 +1166,124 @@ query_end_session_complete (GsmManager *manager) +@@ -1202,91 +1203,125 @@ query_end_session_complete (GsmManager *manager) + static gboolean _client_request_save (GsmClient *client, ClientEndSessionData *data) @@ -105,7 +106,7 @@ index 711961d6..3c6bb7f4 100644 return _client_request_save (client, data); } - static void ++static void +fail_pending_save_invocations (GsmManager *manager, + GError *error) +{ @@ -136,7 +137,7 @@ index 711961d6..3c6bb7f4 100644 + manager->priv->pending_save_invocations = NULL; +} + -+static void + static void query_save_session_complete (GsmManager *manager) { GError *error = NULL; @@ -200,7 +201,7 @@ index 711961d6..3c6bb7f4 100644 { GSList *l; -@@ -2699,92 +2734,101 @@ gsm_manager_initialization_error (GsmExportedManager *skeleton, +@@ -2737,92 +2772,101 @@ gsm_manager_initialization_error (GsmExportedManager *skeleton, GsmManager *manager) { if (manager->priv->phase != GSM_MANAGER_PHASE_INITIALIZATION) { @@ -424,5 +425,5 @@ index 29eb0990..ac73adc9 100644 Request a logout dialog -- -2.12.0 +2.14.2 diff --git a/SOURCES/0013-manager-save-session-type-in-session-dir.patch b/SOURCES/0013-manager-save-session-type-in-session-dir.patch index a28b2f4..1159639 100644 --- a/SOURCES/0013-manager-save-session-type-in-session-dir.patch +++ b/SOURCES/0013-manager-save-session-type-in-session-dir.patch @@ -1,4 +1,4 @@ -From c5ad3fc27895f07f871d94aea69fc4713b258a82 Mon Sep 17 00:00:00 2001 +From b92add119aa5b9813556db26477170dd39eca5b6 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 15:32:04 -0500 Subject: [PATCH 13/19] manager: save session type in session dir @@ -15,10 +15,10 @@ restore classic mode. 5 files changed, 71 insertions(+), 8 deletions(-) diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index 3c6bb7f4..4377fe9b 100644 +index 6630aab8..135392fd 100644 --- a/gnome-session/gsm-manager.c +++ b/gnome-session/gsm-manager.c -@@ -1222,61 +1222,61 @@ finish_pending_save_invocations (GsmManager *manager) +@@ -1260,61 +1260,61 @@ finish_pending_save_invocations (GsmManager *manager) g_slist_free (manager->priv->pending_save_invocations); manager->priv->pending_save_invocations = NULL; } @@ -81,7 +81,7 @@ index 3c6bb7f4..4377fe9b 100644 } while (gsm_store_find (manager->priv->inhibitors, (GsmStoreFunc)_find_by_cookie, &cookie) != NULL); return cookie; -@@ -1490,60 +1490,77 @@ debug_app_summary (GsmManager *manager) +@@ -1528,60 +1528,77 @@ debug_app_summary (GsmManager *manager) g_debug ("GsmManager: App startup summary"); for (phase = GSM_MANAGER_PHASE_EARLY_INITIALIZATION; phase < GSM_MANAGER_PHASE_RUNNING; phase++) { @@ -159,7 +159,7 @@ index 3c6bb7f4..4377fe9b 100644 return (app_id_b != NULL && strcmp (app_id_a, app_id_b) == 0); } -@@ -1908,61 +1925,61 @@ on_xsmp_client_register_confirmed (GsmXSMPClient *client, +@@ -1946,61 +1963,61 @@ on_xsmp_client_register_confirmed (GsmXSMPClient *client, } } @@ -582,23 +582,23 @@ index e623260f..c91b5615 100644 #endif /* __GSM_SESSION_SAVE_H__ */ diff --git a/gnome-session/main.c b/gnome-session/main.c -index 614c3427..7a4c855b 100644 +index e2c3efef..6e697678 100644 --- a/gnome-session/main.c +++ b/gnome-session/main.c -@@ -113,61 +113,70 @@ term_or_int_signal_cb (gpointer data) - +@@ -119,61 +119,70 @@ sigusr2_cb (gpointer data) static gboolean - sigusr2_cb (gpointer data) + sigusr1_cb (gpointer data) { - g_debug ("-------- MARK --------"); + gdm_log_toggle_debug (); return TRUE; } - static gboolean - sigusr1_cb (gpointer data) + static void + on_name_acquired (GDBusConnection *connection, + const char *name, + gpointer data) { - gdm_log_toggle_debug (); - return TRUE; + gsm_manager_start (manager); } static void @@ -634,7 +634,6 @@ index 614c3427..7a4c855b 100644 } _gsm_manager_set_renderer (manager, gl_renderer); - gsm_manager_start (manager); } static void @@ -652,11 +651,12 @@ index 614c3427..7a4c855b 100644 GSM_DBUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, on_bus_acquired, - NULL, + on_name_acquired, on_name_lost, NULL, NULL); } + static gboolean -- -2.12.0 +2.14.2 diff --git a/SOURCES/0014-session-selector-restore-saved-session-mode.patch b/SOURCES/0014-session-selector-restore-saved-session-mode.patch index 4ec53d8..2519a00 100644 --- a/SOURCES/0014-session-selector-restore-saved-session-mode.patch +++ b/SOURCES/0014-session-selector-restore-saved-session-mode.patch @@ -1,4 +1,4 @@ -From b6c78c97a1eac2c4c1711cd86ed740cd9d25c9fc Mon Sep 17 00:00:00 2001 +From 2a15240b8653b8fe0f0c1e2804d7c2fe8452a604 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 7 Jan 2014 21:16:23 -0500 Subject: [PATCH 14/19] session-selector: restore saved session mode @@ -38,5 +38,5 @@ index 07fdb0cc..358aee01 100644 + +exec gnome-session "$session_type_argument" -- -2.12.0 +2.14.2 diff --git a/SOURCES/0015-session-selector-refresh-from-recent-glade.patch b/SOURCES/0015-session-selector-refresh-from-recent-glade.patch index d15c654..2b592ba 100644 --- a/SOURCES/0015-session-selector-refresh-from-recent-glade.patch +++ b/SOURCES/0015-session-selector-refresh-from-recent-glade.patch @@ -1,4 +1,4 @@ -From 813c3f933584b9a11f88ab3bd26fc266ffac28c8 Mon Sep 17 00:00:00 2001 +From 3e35abd4c7d0aae97d868db6e66706c2ccdeeb11 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Dec 2013 10:53:33 -0500 Subject: [PATCH 15/19] session-selector: refresh from recent glade @@ -265,5 +265,5 @@ index 1534a746..4d1e3009 100644 + -- -2.12.0 +2.14.2 diff --git a/SOURCES/0016-session-selector-add-toggle-for-classic-normal-selec.patch b/SOURCES/0016-session-selector-add-toggle-for-classic-normal-selec.patch index d1674d9..b6b80cf 100644 --- a/SOURCES/0016-session-selector-add-toggle-for-classic-normal-selec.patch +++ b/SOURCES/0016-session-selector-add-toggle-for-classic-normal-selec.patch @@ -1,4 +1,4 @@ -From a5a64308ef552d7a1ef4210db9d848c9fd7b3740 Mon Sep 17 00:00:00 2001 +From f0f0898da1c1e28d4ad6d6c17ba559e59780bd21 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 7 Jan 2014 21:02:02 -0500 Subject: [PATCH 16/19] session-selector: add toggle for classic/normal @@ -126,7 +126,7 @@ index 4d1e3009..beab73a1 100644 diff --git a/tools/gnome-session-selector.c b/tools/gnome-session-selector.c -index 8f37eca4..f7f12e7b 100644 +index 53822f6c..a7361a5b 100644 --- a/tools/gnome-session-selector.c +++ b/tools/gnome-session-selector.c @@ -16,60 +16,61 @@ @@ -197,7 +197,7 @@ index 8f37eca4..f7f12e7b 100644 gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, 0, &n, -1); if (strcmp (n, name) == 0) { char *message; - message = g_strdup_printf (_("A session named ‘%s’ already exists"), name); + message = g_strdup_printf (_("A session named “%s” already exists"), name); warning_text = g_strdup_printf ("%s\nNote: %s", info_text, message); g_free (message); g_free (n); @@ -600,5 +600,5 @@ index 8f37eca4..f7f12e7b 100644 return 0; } -- -2.12.0 +2.14.2 diff --git a/SOURCES/0017-session-selector-use-classic-mode-by-default.patch b/SOURCES/0017-session-selector-use-classic-mode-by-default.patch index d777036..2e33fa4 100644 --- a/SOURCES/0017-session-selector-use-classic-mode-by-default.patch +++ b/SOURCES/0017-session-selector-use-classic-mode-by-default.patch @@ -1,4 +1,4 @@ -From 8df9a4f1bb272d982d7b63fb2f4c7db92ff55a10 Mon Sep 17 00:00:00 2001 +From 12df4f92bff325fbffcaa4eb0ee0392511f6ebb6 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 8 Jan 2014 10:15:29 -0500 Subject: [PATCH 17/19] session-selector: use classic mode by default @@ -8,7 +8,7 @@ Subject: [PATCH 17/19] session-selector: use classic mode by default 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gnome-session-selector.c b/tools/gnome-session-selector.c -index f7f12e7b..1068dbba 100644 +index a7361a5b..a41cd260 100644 --- a/tools/gnome-session-selector.c +++ b/tools/gnome-session-selector.c @@ -16,61 +16,61 @@ @@ -75,5 +75,5 @@ index f7f12e7b..1068dbba 100644 return name; } -- -2.12.0 +2.14.2 diff --git a/SOURCES/0018-manager-port-away-from-dbus-glib-to-GDBus.patch b/SOURCES/0018-manager-port-away-from-dbus-glib-to-GDBus.patch index a90150b..a5f88d5 100644 --- a/SOURCES/0018-manager-port-away-from-dbus-glib-to-GDBus.patch +++ b/SOURCES/0018-manager-port-away-from-dbus-glib-to-GDBus.patch @@ -1,4 +1,4 @@ -From d8f3c88186a22984b79d5f9f78d6007451ab4e02 Mon Sep 17 00:00:00 2001 +From 916d9ba86cf2020ffedff331397ed02b5e53f030 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 8 Mar 2017 16:36:44 -0500 Subject: [PATCH 18/19] manager: port away from dbus-glib to GDBus @@ -212,7 +212,7 @@ index 51fa5106..04452c1a 100644 static void diff --git a/configure.ac b/configure.ac -index ccbbf970..cc554a8a 100644 +index d0eeab8a..5182c09e 100644 --- a/configure.ac +++ b/configure.ac @@ -21,61 +21,61 @@ LT_PREREQ([2.2.6]) @@ -279,10 +279,10 @@ index ccbbf970..cc554a8a 100644 gtk+-3.0 >= $GTK3_REQUIRED ) diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c -index 4377fe9b..7c0351a2 100644 +index 135392fd..29c3054d 100644 --- a/gnome-session/gsm-manager.c +++ b/gnome-session/gsm-manager.c -@@ -1172,78 +1172,78 @@ _client_request_save (GsmClient *client, +@@ -1210,78 +1210,78 @@ _client_request_save (GsmClient *client, error = NULL; ret = gsm_client_request_save (client, data->flags, &error); @@ -365,7 +365,7 @@ index 4377fe9b..7c0351a2 100644 if (manager->priv->query_timeout_id > 0) { g_source_remove (manager->priv->query_timeout_id); manager->priv->query_timeout_id = 0; -@@ -2752,96 +2752,96 @@ gsm_manager_initialization_error (GsmExportedManager *skeleton, +@@ -2790,96 +2790,96 @@ gsm_manager_initialization_error (GsmExportedManager *skeleton, { if (manager->priv->phase != GSM_MANAGER_PHASE_INITIALIZATION) { g_dbus_method_invocation_return_error (invocation, @@ -571,7 +571,7 @@ index fcf36019..88a88ccc 100644 #endif /* __GSM_MANAGER_H */ diff --git a/tools/gnome-session-selector.c b/tools/gnome-session-selector.c -index 1068dbba..08503a9b 100644 +index a41cd260..6ad307b0 100644 --- a/tools/gnome-session-selector.c +++ b/tools/gnome-session-selector.c @@ -7,63 +7,60 @@ @@ -752,5 +752,5 @@ index 1068dbba..08503a9b 100644 int -- -2.12.0 +2.14.2 diff --git a/SOURCES/0019-capplet-fix-disable-check-items.patch b/SOURCES/0019-capplet-fix-disable-check-items.patch index 98cc56b..267e0e7 100644 --- a/SOURCES/0019-capplet-fix-disable-check-items.patch +++ b/SOURCES/0019-capplet-fix-disable-check-items.patch @@ -1,4 +1,4 @@ -From b502391322b2660f1bbb4fa9abcecc6cb0680a6e Mon Sep 17 00:00:00 2001 +From 0dfb463e126353b17d0c6ec63b99f10bae3fd919 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 27 Mar 2017 15:34:51 -0400 Subject: [PATCH 19/19] capplet: fix disable check items @@ -87,5 +87,5 @@ index 123ab217..1a0580e6 100644 } g_clear_pointer (&str, g_free); -- -2.12.0 +2.14.2 diff --git a/SPECS/gnome-session.spec b/SPECS/gnome-session.spec index 363075b..9a2bcf7 100644 --- a/SPECS/gnome-session.spec +++ b/SPECS/gnome-session.spec @@ -4,11 +4,11 @@ Summary: GNOME session manager Name: gnome-session -Version: 3.22.3 -Release: 4%{?dist} +Version: 3.26.1 +Release: 11%{?dist} URL: http://www.gnome.org #VCS: git:git://git.gnome.org/gnome-session -Source0: http://download.gnome.org/sources/gnome-session/3.22/%{name}-%{version}.tar.xz +Source0: http://download.gnome.org/sources/gnome-session/3.26/%{name}-%{version}.tar.xz # Blacklist NV30: https://bugzilla.redhat.com/show_bug.cgi?id=745202 Patch00:gnome-session-3.3.92-nv30.patch @@ -36,7 +36,10 @@ Patch18: 0017-session-selector-use-classic-mode-by-default.patch Patch19: 0018-manager-port-away-from-dbus-glib-to-GDBus.patch Patch20: 0019-capplet-fix-disable-check-items.patch -Patch30: 0001-fail-whale-handle-X-server-dying-before-startup.patch +Patch30: 0001-save-make-sure-app-state-is-written-into-desktop-fil.patch +Patch31: 0002-autostart-ensure-gnome-shell-and-mutter-get-right-au.patch + +Patch40: 0001-main-don-t-call-into-gdbus-before-setting-all-enviro.patch License: GPLv2+ Group: User Interface/Desktops @@ -98,6 +101,15 @@ Requires: dconf gnome-session manages a GNOME desktop or GDM login session. It starts up the other core GNOME components and handles logout and saving the session. +%package wayland-session +Summary: Desktop file for gnome-session (Wayland) +Group: User Interface/Desktops +Requires: gnome-session = %{version}-%{release} +Requires: xorg-x11-server-Xwayland + +%description wayland-session +Desktop file to add GNOME (Wayland) to display manager session menu. + %package xsession Summary: Desktop file for gnome-session Group: User Interface/Desktops @@ -132,8 +144,9 @@ make %{?_smp_mflags} V=1 %make_install -rm -rf $RPM_BUILD_ROOT%{_datadir}/wayland-sessions -rm -rf $RPM_BUILD_ROOT%{_datadir}/xsessions/gnome-xorg.desktop +mv $RPM_BUILD_ROOT%{_datadir}/xsessions/gnome-xorg.desktop \ + $RPM_BUILD_ROOT%{_datadir}/wayland-sessions/gnome-wayland.desktop +sed -i -e 's/Xorg/Wayland/g' $RPM_BUILD_ROOT%{_datadir}/wayland-sessions/gnome-wayland.desktop %find_lang %{po_package} @@ -153,6 +166,9 @@ fi gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : +%files wayland-session +%{_datadir}/wayland-sessions/* + %files xsession %{_datadir}/xsessions/* @@ -182,6 +198,40 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : %{_datadir}/glib-2.0/schemas/org.gnome.SessionManager.gschema.xml %changelog +* Wed Feb 14 2018 Ray Strode - 3.26.1-11 +- Fix rare crash at start up for VNC sessions + Resolves: #1545234 + +* Fri Jan 19 2018 Ray Strode - 3.26.1-10 +- Correct app id test in upgrade compat fix for wayland + sessions. + Related: #1529175 + +* Thu Jan 18 2018 Ray Strode - 3.26.1-9 +- Fix wayland when user has saved sessions + Resolves: #1529175 + +* Fri Nov 10 2017 Ray Strode 3.26.1-8 +- New sed incantation is still overzealous. Rework how + gnome-wayland session file is generated. + Resolves: #1510391 + +* Tue Nov 07 2017 Ray Strode - 3.26.1-7 +- Fix sed script so we don't change DesktopNames (oops) + Related: #1482140 + Resolves: 1510391 + +* Mon Nov 06 2017 Ray Strode - 3.26.1-6 +- Add Requires for Xwayland to wayland subpackage + Related: #1482140 + Resolves: 1509247 + +* Thu Oct 19 2017 Ray Strode - 3.26.1-1 +- add wayland session file + Resolves: #1482140 +- update to 3.26.1 to work with wayland sessions + Resolves: 1504156 + * Tue May 30 2017 Ray Strode - 3.22.3-4 - fix crash in fail whale Resolves: #1392970