mutter/libmutter-session-save.patch
2011-04-28 14:39:30 -04:00

52 lines
1.4 KiB
Diff

diff -up mutter-3.0.1/src/core/session.c.save mutter-3.0.1/src/core/session.c
--- mutter-3.0.1/src/core/session.c.save 2011-04-27 21:44:14.349244352 -0400
+++ mutter-3.0.1/src/core/session.c 2011-04-27 21:52:28.558065891 -0400
@@ -308,13 +308,16 @@ meta_session_init (const char *previous_
*/
char hint = SmRestartIfRunning;
char priority = 20; /* low to run before other apps */
-
+ char *prgname;
+
+ prgname = g_get_prgname ();
+
prop1.name = SmProgram;
prop1.type = SmARRAY8;
prop1.num_vals = 1;
prop1.vals = &prop1val;
- prop1val.value = "mutter";
- prop1val.length = strlen ("mutter");
+ prop1val.value = prgname;
+ prop1val.length = strlen (prgname);
/* twm sets getuid() for this, but the SM spec plainly
* says pw_name, twm is on crack
@@ -573,6 +576,9 @@ set_clone_restart_commands (void)
char *discardv[10];
int i;
SmProp prop1, prop2, prop3, *props[3];
+ char *prgname;
+
+ prgname = g_get_prgname ();
/* Restart (use same client ID) */
@@ -582,7 +588,7 @@ set_clone_restart_commands (void)
g_return_if_fail (client_id);
i = 0;
- restartv[i] = "mutter";
+ restartv[i] = prgname;
++i;
restartv[i] = "--sm-client-id";
++i;
@@ -603,7 +609,7 @@ set_clone_restart_commands (void)
/* Clone (no client ID) */
i = 0;
- clonev[i] = "mutter";
+ clonev[i] = prgname;
++i;
clonev[i] = NULL;