Bug#534977: gnome-session: fails to honour second-phase request for local save
Ben Hutchings
ben at decadent.org.uk
Sun Jun 28 17:28:12 UTC 2009
Package: gnome-session-bin
Version: 2.26.1-7
Severity: important
Tags: patch
I found that Ion3's "restart" command fails to work when managed
by gnome-session-manager. It requests to be saved using:
SmcRequestSaveYourself(sm_conn, SmSaveBoth, False,
SmInteractStyleAny, False, False);
gnome-session immediately sends it a save request. Ion3 responds
by asking to be saved in the second phase. This is a bit silly in
this context but makes sense in general. gnome-session ignores this
response and Ion3 never restarts.
The following patch fixes this.
Ben.
--- gnome-session-2.26.1.orig/gnome-session/gsm-xsmp-client.c
+++ gnome-session-2.26.1/gnome-session/gsm-xsmp-client.c
@@ -1203,13 +1203,18 @@
g_debug ("GsmXSMPClient: Client '%s' received SaveYourselfPhase2Request",
client->priv->description);
- client->priv->current_save_yourself = -1;
-
- /* this is a valid response to SaveYourself and therefore
- may be a response to a QES or ES */
- gsm_client_end_session_response (GSM_CLIENT (client),
- TRUE, TRUE, FALSE,
- NULL);
+ if (client->priv->current_save_yourself == SmSaveLocal) {
+ /* no other clients involved; proceed straight to phase 2 */
+ xsmp_save_yourself_phase2 (client);
+ } else {
+ client->priv->current_save_yourself = -1;
+
+ /* this is a valid response to SaveYourself and therefore
+ may be a response to a QES or ES */
+ gsm_client_end_session_response (GSM_CLIENT (client),
+ TRUE, TRUE, FALSE,
+ NULL);
+ }
}
static void
--- END ---
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (x86_64)
Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gnome-session-bin depends on:
ii dbus-x11 1.2.14-3 simple interprocess messaging syst
ii gconf2 2.26.2-1 GNOME configuration database syste
ii libc6 2.9-16 GNU C Library: Shared libraries
ii libdbus-1-3 1.2.14-3 simple interprocess messaging syst
ii libdbus-glib-1-2 0.80-4 simple interprocess messaging syst
ii libgconf2-4 2.26.2-1 GNOME configuration database syste
ii libglade2-0 1:2.6.4-1 library to load .glade files at ru
ii libglib2.0-0 2.20.3-1 The GLib library of C routines
ii libgtk2.0-0 2.16.2-1 The GTK+ graphical user interface
ii libice6 2:1.0.5-1 X11 Inter-Client Exchange library
ii libpango1.0-0 1.24.2-1 Layout and rendering of internatio
ii libpolkit-dbus2 0.9-4 library for accessing PolicyKit vi
ii libpolkit-gnome0 0.9.2-2 PolicyKit-gnome library
ii libpolkit2 0.9-4 library for accessing PolicyKit
ii libsm6 2:1.1.0-2 X11 Session Management library
ii libstartup-notification0 0.10-1 library for program launch feedbac
ii libx11-6 2:1.2.1-1 X11 client-side library
ii libxau6 1:1.0.4-2 X11 authorisation library
ii libxext6 2:1.0.4-1 X11 miscellaneous extension librar
ii libxrender1 1:0.9.4-2 X Rendering Extension client libra
ii libxtst6 2:1.0.3-1 X11 Testing -- Resource extension
ii policykit-gnome 0.9.2-2 GNOME dialogs for PolicyKit
gnome-session-bin recommends no packages.
gnome-session-bin suggests no packages.
-- debconf-show failed
More information about the pkg-gnome-maintainers
mailing list