From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QFtBD-0003it-GG for garchives@archives.gentoo.org; Fri, 29 Apr 2011 19:16:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E5D381C077; Fri, 29 Apr 2011 19:16:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A6C621C077 for ; Fri, 29 Apr 2011 19:16:36 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D600F1B4055 for ; Fri, 29 Apr 2011 19:16:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 39AAA80504 for ; Fri, 29 Apr 2011 19:16:35 +0000 (UTC) From: "Nirbheek Chauhan" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nirbheek Chauhan" Message-ID: <74f208549efd045e73be0b08edb53594d567683f.nirbheek@gentoo> Subject: [gentoo-commits] proj/gnome:master commit in: x11-wm/mutter/, x11-wm/mutter/files/ X-VCS-Repository: proj/gnome X-VCS-Files: x11-wm/mutter/files/mutter-3.0.1-fix-session-saving.patch x11-wm/mutter/mutter-3.0.1-r1.ebuild x11-wm/mutter/mutter-3.0.1.ebuild X-VCS-Directories: x11-wm/mutter/ x11-wm/mutter/files/ X-VCS-Committer: nirbheek X-VCS-Committer-Name: Nirbheek Chauhan X-VCS-Revision: 74f208549efd045e73be0b08edb53594d567683f Date: Fri, 29 Apr 2011 19:16:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: a5c6387d8c3dea9343163a5c63b968a5 commit: 74f208549efd045e73be0b08edb53594d567683f Author: Nirbheek Chauhan gentoo org> AuthorDate: Fri Apr 29 19:15:52 2011 +0000 Commit: Nirbheek Chauhan gentoo org> CommitDate: Fri Apr 29 19:15:52 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gnome.git;a=3D= commit;h=3D74f20854 x11-wm/mutter: fix session saving, bug 363853 --- .../files/mutter-3.0.1-fix-session-saving.patch | 69 ++++++++++++++= ++++++ ...{mutter-3.0.1.ebuild =3D> mutter-3.0.1-r1.ebuild} | 6 ++ 2 files changed, 75 insertions(+), 0 deletions(-) diff --git a/x11-wm/mutter/files/mutter-3.0.1-fix-session-saving.patch b/= x11-wm/mutter/files/mutter-3.0.1-fix-session-saving.patch new file mode 100644 index 0000000..7352d2c --- /dev/null +++ b/x11-wm/mutter/files/mutter-3.0.1-fix-session-saving.patch @@ -0,0 +1,69 @@ +From c248c57b6e48b230fc80e3bd53d0d41fb713848a Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Fri, 29 Apr 2011 11:23:30 +0000 +Subject: 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=3D648828 +--- +diff --git a/src/core/session.c b/src/core/session.c +index 65542f3..c19b17c 100644 +--- a/src/core/session.c ++++ b/src/core/session.c +@@ -308,13 +308,16 @@ meta_session_init (const char *previous_client_id, + */ + char hint =3D SmRestartIfRunning; + char priority =3D 20; /* low to run before other apps */ +- =20 ++ const char *prgname; ++ ++ prgname =3D g_get_prgname (); ++ + prop1.name =3D SmProgram; + prop1.type =3D SmARRAY8; + prop1.num_vals =3D 1; + prop1.vals =3D &prop1val; +- prop1val.value =3D "mutter"; +- prop1val.length =3D strlen ("mutter"); ++ prop1val.value =3D (char *)prgname; ++ prop1val.length =3D strlen (prgname); +=20 + /* 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 =3D g_get_prgname (); + =20 + /* Restart (use same client ID) */ + =20 +@@ -582,7 +588,7 @@ set_clone_restart_commands (void) + g_return_if_fail (client_id); + =20 + i =3D 0; +- restartv[i] =3D "mutter"; ++ restartv[i] =3D (char *)prgname; + ++i; + restartv[i] =3D "--sm-client-id"; + ++i; +@@ -603,7 +609,7 @@ set_clone_restart_commands (void) + /* Clone (no client ID) */ + =20 + i =3D 0; +- clonev[i] =3D "mutter"; ++ clonev[i] =3D (char *)prgname; + ++i; + clonev[i] =3D NULL; +=20 +-- +cgit v0.9 diff --git a/x11-wm/mutter/mutter-3.0.1.ebuild b/x11-wm/mutter/mutter-3.0= .1-r1.ebuild similarity index 91% rename from x11-wm/mutter/mutter-3.0.1.ebuild rename to x11-wm/mutter/mutter-3.0.1-r1.ebuild index 0eee508..d33255c 100644 --- a/x11-wm/mutter/mutter-3.0.1.ebuild +++ b/x11-wm/mutter/mutter-3.0.1-r1.ebuild @@ -76,3 +76,9 @@ pkg_setup() { $(use_enable introspection) $(use_enable xinerama)" } + +src_prepare() { + # https://bugs.gentoo.org/show_bug.cgi?id=3D363853 + # Taken from upstream, remove for next release + epatch "${FILESDIR}/${P}-fix-session-saving.patch" +}