gnome-session r5356 - in trunk: . gnome-session
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r5356 - in trunk: . gnome-session
- Date: Tue, 24 Mar 2009 22:59:38 +0000 (UTC)
Author: vuntz
Date: Tue Mar 24 22:59:38 2009
New Revision: 5356
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5356&view=rev
Log:
2009-03-24 Vincent Untz <vuntz gnome org>
* gnome-session/gsm-xsmp-client.c: (do_save_yourself): just add some
paranoia code to make sure our state is consistent
(xsmp_cancel_end_session): reset the save_yourself state here since we
cancel the operation anyway
(save_yourself_phase2_request_callback): fix to not behave exactly like
SaveYourselfDone. This is wrong according to XSMP.
(save_yourself_done_callback): always call SmsSaveComplete() (it's
expected by XSMP), and ignore the success argument. It's actually
useless.
Modified:
trunk/ChangeLog
trunk/gnome-session/gsm-xsmp-client.c
Modified: trunk/gnome-session/gsm-xsmp-client.c
==============================================================================
--- trunk/gnome-session/gsm-xsmp-client.c (original)
+++ trunk/gnome-session/gsm-xsmp-client.c Tue Mar 24 22:59:38 2009
@@ -437,6 +437,8 @@
client->priv->next_save_yourself = save_type;
} else {
client->priv->current_save_yourself = save_type;
+ /* make sure we don't have anything queued */
+ client->priv->next_save_yourself = -1;
switch (save_type) {
case SmSaveLocal:
@@ -507,6 +509,11 @@
}
SmsShutdownCancelled (xsmp->priv->conn);
+
+ /* reset the state */
+ xsmp->priv->current_save_yourself = -1;
+ xsmp->priv->next_save_yourself = -1;
+
return TRUE;
}
@@ -1125,13 +1132,7 @@
g_debug ("GsmXSMPClient: Client '%s' received SaveYourselfPhase2Request",
client->priv->description);
- /* Treat this just like a SaveYourselfDone */
- if (client->priv->current_save_yourself == SmSaveLocal) {
- client->priv->current_save_yourself = -1;
- SmsSaveComplete (client->priv->conn);
- } else {
- client->priv->current_save_yourself = -1;
- }
+ client->priv->current_save_yourself = -1;
/* this is a valid response to SaveYourself and therefore
may be a response to a QES or ES */
@@ -1199,22 +1200,15 @@
client->priv->description,
success ? "True" : "False");
- if (client->priv->current_save_yourself == SmSaveLocal) {
- client->priv->current_save_yourself = -1;
- SmsSaveComplete (client->priv->conn);
- } else {
- client->priv->current_save_yourself = -1;
- }
+ client->priv->current_save_yourself = -1;
+ SmsSaveComplete (client->priv->conn);
- /* If success is false then the application still has
- unsafe data. We may also have tricked it into sending
- us this message when we faked the ShutdownCancel to
- break its grabs. */
- if (success) {
- gdm_client_end_session_response (GSM_CLIENT (client),
- TRUE,
- NULL);
- }
+ /* If success is false then the application couldn't save data. Nothing
+ * the session manager can do about, though. FIXME: we could display a
+ * dialog about this, I guess. */
+ gdm_client_end_session_response (GSM_CLIENT (client),
+ TRUE,
+ NULL);
if (client->priv->next_save_yourself) {
int save_type = client->priv->next_save_yourself;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]