summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHavoc Pennington <hp@src.gnome.org>2001-09-14 14:25:24 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-09-14 14:25:24 +0000
commit3886f0ecac7b8fb353aead7939c071ecad5a8cd0 (patch)
treeec0ecc2421a77002765fdaf9477ceecfbeaa7977
parentb1c7811e89932f4882e5b0452de096c7f5f32ac1 (diff)
downloadmetacity-3886f0ecac7b8fb353aead7939c071ecad5a8cd0.tar.gz
...
-rw-r--r--src/msm/client.c31
-rw-r--r--src/msm/client.h1
-rw-r--r--src/msm/server.c5
3 files changed, 28 insertions, 9 deletions
diff --git a/src/msm/client.c b/src/msm/client.c
index 70c02db9..bcc831fd 100644
--- a/src/msm/client.c
+++ b/src/msm/client.c
@@ -196,11 +196,12 @@ msm_client_begin_interact (MsmClient *client)
SmsInteract (client->cnxn);
}
-void
-msm_client_save (MsmClient *client,
- gboolean allow_interaction,
- gboolean shut_down)
-{
+static void
+internal_save (MsmClient *client,
+ int save_style,
+ gboolean allow_interaction,
+ gboolean shut_down)
+{
if (client->state != MSM_CLIENT_STATE_IDLE)
{
msm_warning (_("Tried to save client '%s' but it was not in the idle state\n"),
@@ -212,13 +213,31 @@ msm_client_save (MsmClient *client,
client->state = MSM_CLIENT_STATE_SAVING;
SmsSaveYourself (client->cnxn,
- SmSaveBoth, /* This arg makes no sense whatsoever */
+ save_style,
shut_down,
allow_interaction ? SmInteractStyleAny : SmInteractStyleNone,
FALSE /* not "fast" */);
}
void
+msm_client_save (MsmClient *client,
+ gboolean allow_interaction,
+ gboolean shut_down)
+{
+ internal_save (client, SmSaveBoth, /* ? don't know what to do here */
+ allow_interaction, shut_down);
+}
+
+void
+msm_client_initial_save (MsmClient *client)
+{
+ /* This is the save on client registration in the spec under
+ * RegisterClientReply
+ */
+ internal_save (client, SmSaveLocal, allow_interaction, shut_down);
+}
+
+void
msm_client_shutdown_cancelled (MsmClient *client)
{
if (client->state != MSM_CLIENT_STATE_SAVING &&
diff --git a/src/msm/client.h b/src/msm/client.h
index b542bd9a..ad638e74 100644
--- a/src/msm/client.h
+++ b/src/msm/client.h
@@ -83,6 +83,7 @@ void msm_client_begin_interact (MsmClient *client);
void msm_client_save (MsmClient *client,
gboolean allow_interaction,
gboolean shut_down);
+void msm_client_initial_save (MsmClient *client);
void msm_client_shutdown_cancelled (MsmClient *client);
void msm_client_phase2_request (MsmClient *client);
void msm_client_save_phase2 (MsmClient *client);
diff --git a/src/msm/server.c b/src/msm/server.c
index 1370f1e1..cae87082 100644
--- a/src/msm/server.c
+++ b/src/msm/server.c
@@ -238,9 +238,8 @@ register_client_callback (SmsConn cnxn,
free (id);
- /* FIXME ksm and gnome-session send a SaveYourself to the client
- * here. I don't understand why though.
- */
+ /* SM spec requires this initial SaveYourself. */
+ msm_client_initial_save (client);
return TRUE;
}