1 |
commit: 74f208549efd045e73be0b08edb53594d567683f |
2 |
Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 29 19:15:52 2011 +0000 |
4 |
Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 29 19:15:52 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=74f20854 |
7 |
|
8 |
x11-wm/mutter: fix session saving, bug 363853 |
9 |
|
10 |
--- |
11 |
.../files/mutter-3.0.1-fix-session-saving.patch | 69 ++++++++++++++++++++ |
12 |
...{mutter-3.0.1.ebuild => mutter-3.0.1-r1.ebuild} | 6 ++ |
13 |
2 files changed, 75 insertions(+), 0 deletions(-) |
14 |
|
15 |
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 |
16 |
new file mode 100644 |
17 |
index 0000000..7352d2c |
18 |
--- /dev/null |
19 |
+++ b/x11-wm/mutter/files/mutter-3.0.1-fix-session-saving.patch |
20 |
@@ -0,0 +1,69 @@ |
21 |
+From c248c57b6e48b230fc80e3bd53d0d41fb713848a Mon Sep 17 00:00:00 2001 |
22 |
+From: Matthias Clasen <mclasen@××××××.com> |
23 |
+Date: Fri, 29 Apr 2011 11:23:30 +0000 |
24 |
+Subject: Make session saving work a bit better |
25 |
+ |
26 |
+Previously, the restart command hardcoded "mutter" as the binary name. |
27 |
+This commit changes it to use g_get_prgname() which has a better chance |
28 |
+of being correct (and it does fix session saving for gnome-shell). |
29 |
+ |
30 |
+Now that mutter is a library, it might be more correct (but also |
31 |
+much higher overhead) to add api for setting these things from |
32 |
+the outside. |
33 |
+ |
34 |
+https://bugzilla.gnome.org/show_bug.cgi?id=648828 |
35 |
+--- |
36 |
+diff --git a/src/core/session.c b/src/core/session.c |
37 |
+index 65542f3..c19b17c 100644 |
38 |
+--- a/src/core/session.c |
39 |
++++ b/src/core/session.c |
40 |
+@@ -308,13 +308,16 @@ meta_session_init (const char *previous_client_id, |
41 |
+ */ |
42 |
+ char hint = SmRestartIfRunning; |
43 |
+ char priority = 20; /* low to run before other apps */ |
44 |
+- |
45 |
++ const char *prgname; |
46 |
++ |
47 |
++ prgname = g_get_prgname (); |
48 |
++ |
49 |
+ prop1.name = SmProgram; |
50 |
+ prop1.type = SmARRAY8; |
51 |
+ prop1.num_vals = 1; |
52 |
+ prop1.vals = &prop1val; |
53 |
+- prop1val.value = "mutter"; |
54 |
+- prop1val.length = strlen ("mutter"); |
55 |
++ prop1val.value = (char *)prgname; |
56 |
++ prop1val.length = strlen (prgname); |
57 |
+ |
58 |
+ /* twm sets getuid() for this, but the SM spec plainly |
59 |
+ * says pw_name, twm is on crack |
60 |
+@@ -573,6 +576,9 @@ set_clone_restart_commands (void) |
61 |
+ char *discardv[10]; |
62 |
+ int i; |
63 |
+ SmProp prop1, prop2, prop3, *props[3]; |
64 |
++ const char *prgname; |
65 |
++ |
66 |
++ prgname = g_get_prgname (); |
67 |
+ |
68 |
+ /* Restart (use same client ID) */ |
69 |
+ |
70 |
+@@ -582,7 +588,7 @@ set_clone_restart_commands (void) |
71 |
+ g_return_if_fail (client_id); |
72 |
+ |
73 |
+ i = 0; |
74 |
+- restartv[i] = "mutter"; |
75 |
++ restartv[i] = (char *)prgname; |
76 |
+ ++i; |
77 |
+ restartv[i] = "--sm-client-id"; |
78 |
+ ++i; |
79 |
+@@ -603,7 +609,7 @@ set_clone_restart_commands (void) |
80 |
+ /* Clone (no client ID) */ |
81 |
+ |
82 |
+ i = 0; |
83 |
+- clonev[i] = "mutter"; |
84 |
++ clonev[i] = (char *)prgname; |
85 |
+ ++i; |
86 |
+ clonev[i] = NULL; |
87 |
+ |
88 |
+-- |
89 |
+cgit v0.9 |
90 |
|
91 |
diff --git a/x11-wm/mutter/mutter-3.0.1.ebuild b/x11-wm/mutter/mutter-3.0.1-r1.ebuild |
92 |
similarity index 91% |
93 |
rename from x11-wm/mutter/mutter-3.0.1.ebuild |
94 |
rename to x11-wm/mutter/mutter-3.0.1-r1.ebuild |
95 |
index 0eee508..d33255c 100644 |
96 |
--- a/x11-wm/mutter/mutter-3.0.1.ebuild |
97 |
+++ b/x11-wm/mutter/mutter-3.0.1-r1.ebuild |
98 |
@@ -76,3 +76,9 @@ pkg_setup() { |
99 |
$(use_enable introspection) |
100 |
$(use_enable xinerama)" |
101 |
} |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=363853 |
105 |
+ # Taken from upstream, remove for next release |
106 |
+ epatch "${FILESDIR}/${P}-fix-session-saving.patch" |
107 |
+} |