Compare commits

...

2 Commits

Author SHA1 Message Date
75af6fc40c Bump version to 3.0.2.1
Update NEWS
2011-05-25 15:42:10 -04:00
bbfcde1caa Make session saving work a bit better
Previously, the restart command hardcoded "mutter" as the binary name.
This commit changes it to use g_get_prgname() which has a better chance
of being correct (and it does fix session saving for gnome-shell).

Now that mutter is a library, it might be more correct (but also
much higher overhead) to add api for setting these things from
the outside.

https://bugzilla.gnome.org/show_bug.cgi?id=648828
2011-05-25 15:39:23 -04:00
3 changed files with 21 additions and 6 deletions

9
NEWS
View File

@ -1,3 +1,12 @@
3.0.2.1
=======
* When saving the session, use the "program name" rather than
harcoding mutter, fixing session saving for gnome-shell [Matthias]
https://bugzilla.gnome.org/show_bug.cgi?id=648828
Contributors:
Matthias Clasen
3.0.2
=====

View File

@ -2,7 +2,7 @@ AC_PREREQ(2.50)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [0])
m4_define([mutter_micro_version], [2])
m4_define([mutter_micro_version], [2.1])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])

View File

@ -308,13 +308,16 @@ meta_session_init (const char *previous_client_id,
*/
char hint = SmRestartIfRunning;
char priority = 20; /* low to run before other apps */
const 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 = (char *)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];
const 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] = (char *)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] = (char *)prgname;
++i;
clonev[i] = NULL;