From e25ef0f3581ae26cf9f6bb415c28e0b0db43cbe1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 28 Apr 2011 14:39:30 -0400 Subject: [PATCH] Fix session saving --- libmutter-session-save.patch | 51 ++++++++++++++++++++++++++++++++++++ mutter.spec | 7 +++-- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 libmutter-session-save.patch diff --git a/libmutter-session-save.patch b/libmutter-session-save.patch new file mode 100644 index 0000000..82d2aef --- /dev/null +++ b/libmutter-session-save.patch @@ -0,0 +1,51 @@ +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; + diff --git a/mutter.spec b/mutter.spec index 856c989..bbb8098 100644 --- a/mutter.spec +++ b/mutter.spec @@ -1,12 +1,12 @@ Name: mutter Version: 3.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Window and compositing manager based on Clutter Group: User Interface/Desktops License: GPLv2+ #VCS: git:git://git.gnome.org/mutter -Source0: ftp://ftp.gnome.org/pub/gnome/sources/%{name}/2.91/%{name}-%{version}.tar.bz2 +Source0: ftp://ftp.gnome.org/pub/gnome/sources/%{name}/3.0/%{name}-%{version}.tar.bz2 BuildRequires: clutter-devel >= 1.5.8 BuildRequires: pango-devel @@ -143,6 +143,9 @@ gconftool-2 --makefile-install-rule \ %doc %{_mandir}/man1/mutter-window-demo.1.gz %changelog +* Thu Apr 28 2011 Matthias Clasen - 3.0.1-2 +- Make session saving of gnome-shell work + * Mon Apr 25 2011 Owen Taylor - 3.0.1-1 - Update to 3.0.1