summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-03-14 04:36:02 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-03-14 04:36:02 +0000
commit42936562de54e5d24b44c94b1f8d7c812e52bebf (patch)
tree13c62b1b2a5445b7e03137fffc591333227382a8 /src/main.c
parent9e2cfcd69943caba90f076537255147254f85033 (diff)
downloadmetacity-42936562de54e5d24b44c94b1f8d7c812e52bebf.tar.gz
put back --sm-client-id argument, needed for including us in a default
2002-03-13 Havoc Pennington <hp@pobox.com> * src/main.c (main): put back --sm-client-id argument, needed for including us in a default session
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 9806a278..2634bf6c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -138,6 +138,28 @@ main (int argc, char **argv)
}
else if (strcmp (arg, "--display") == 0)
; /* wait for next arg */
+ else if (strstr (arg, "--sm-client-id=") == arg)
+ {
+ const char *id;
+
+ if (client_id)
+ meta_fatal ("Can't specify client ID twice\n");
+
+ id = strchr (arg, '=');
+ ++id;
+
+ client_id = g_strdup (id);
+ }
+ else if (prev_arg &&
+ strcmp (prev_arg, "--sm-client-id") == 0)
+ {
+ if (client_id)
+ meta_fatal ("Can't specify client ID twice\n");
+
+ client_id = g_strdup (arg);
+ }
+ else if (strcmp (arg, "--sm-client-id") == 0)
+ ; /* wait for next arg */
else if (strstr (arg, "--sm-save-file=") == arg)
{
const char *file;
@@ -167,7 +189,10 @@ main (int argc, char **argv)
++i;
}
-
+
+ if (save_file && client_id)
+ meta_fatal ("Can't specify both SM save file and SM client id\n");
+
meta_main_loop = g_main_loop_new (NULL, FALSE);
if (display_name == NULL &&
@@ -243,7 +268,7 @@ main (int argc, char **argv)
* info
*/
if (!disable_sm)
- meta_session_init (save_file);
+ meta_session_init (client_id, save_file);
if (!meta_display_open (NULL))
meta_exit (META_EXIT_ERROR);