1 |
commit: e74deb455b878a6cdc0d179aa53d36fc8cea9013 |
2 |
Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Oct 1 00:29:38 2011 +0000 |
4 |
Commit: Alexandre Restovtsev <tetromino <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Oct 1 00:29:38 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=e74deb45 |
7 |
|
8 |
gnome-base/gnome-shell: add various patches |
9 |
|
10 |
Add upstream patches to fix multimonitor behavior, to make the shell |
11 |
recorder actually work, and to not cache unequal icons to the same |
12 |
texture. |
13 |
|
14 |
--- |
15 |
...gnome-shell-3.2.0-boxpointer-multimonitor.patch | 81 ++++++++++++++++++++ |
16 |
.../gnome-shell-3.2.0-recorder-coglhandle.patch | 41 ++++++++++ |
17 |
...2.0-st-texture-cache-non-serialized-icons.patch | 47 +++++++++++ |
18 |
...ll-3.2.0.ebuild => gnome-shell-3.2.0-r1.ebuild} | 13 +++- |
19 |
4 files changed, 181 insertions(+), 1 deletions(-) |
20 |
|
21 |
diff --git a/gnome-base/gnome-shell/files/gnome-shell-3.2.0-boxpointer-multimonitor.patch b/gnome-base/gnome-shell/files/gnome-shell-3.2.0-boxpointer-multimonitor.patch |
22 |
new file mode 100644 |
23 |
index 0000000..4d8497c |
24 |
--- /dev/null |
25 |
+++ b/gnome-base/gnome-shell/files/gnome-shell-3.2.0-boxpointer-multimonitor.patch |
26 |
@@ -0,0 +1,81 @@ |
27 |
+From 7a8a189c483b48de581c490a44d69030ba7a6923 Mon Sep 17 00:00:00 2001 |
28 |
+From: Jasper St. Pierre <jstpierre@×××××××.net> |
29 |
+Date: Thu, 22 Sep 2011 19:52:58 +0000 |
30 |
+Subject: boxpointer: Don't constrain box pointer to primary monitor |
31 |
+ |
32 |
+A boxPointer should be able to be attached to any actor, not just ones on the |
33 |
+primary monitor. Assume that the sourceActor doesn't straddle monitors, and |
34 |
+constrain the boxPointer to the monitor the sourceActor is on. |
35 |
+ |
36 |
+https://bugzilla.gnome.org/show_bug.cgi?id=659861 |
37 |
+--- |
38 |
+diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js |
39 |
+index 1523ef6..979e2d1 100644 |
40 |
+--- a/js/ui/boxpointer.js |
41 |
++++ b/js/ui/boxpointer.js |
42 |
+@@ -329,7 +329,7 @@ BoxPointer.prototype = { |
43 |
+ // We also want to keep it onscreen, and separated from the |
44 |
+ // edge by the same distance as the main part of the box is |
45 |
+ // separated from its sourceActor |
46 |
+- let primary = Main.layoutManager.primaryMonitor; |
47 |
++ let monitor = Main.layoutManager.findMonitorForActor(sourceActor); |
48 |
+ let themeNode = this.actor.get_theme_node(); |
49 |
+ let borderWidth = themeNode.get_length('-arrow-border-width'); |
50 |
+ let arrowBase = themeNode.get_length('-arrow-base'); |
51 |
+@@ -364,8 +364,8 @@ BoxPointer.prototype = { |
52 |
+ case St.Side.BOTTOM: |
53 |
+ resX = sourceCenterX - (halfMargin + (natWidth - margin) * alignment); |
54 |
+ |
55 |
+- resX = Math.max(resX, primary.x + 10); |
56 |
+- resX = Math.min(resX, primary.x + primary.width - (10 + natWidth)); |
57 |
++ resX = Math.max(resX, monitor.x + 10); |
58 |
++ resX = Math.min(resX, monitor.x + monitor.width - (10 + natWidth)); |
59 |
+ this.setArrowOrigin(sourceCenterX - resX); |
60 |
+ break; |
61 |
+ |
62 |
+@@ -373,8 +373,8 @@ BoxPointer.prototype = { |
63 |
+ case St.Side.RIGHT: |
64 |
+ resY = sourceCenterY - (halfMargin + (natHeight - margin) * alignment); |
65 |
+ |
66 |
+- resY = Math.max(resY, primary.y + 10); |
67 |
+- resY = Math.min(resY, primary.y + primary.height - (10 + natHeight)); |
68 |
++ resY = Math.max(resY, monitor.y + 10); |
69 |
++ resY = Math.min(resY, monitor.y + monitor.height - (10 + natHeight)); |
70 |
+ |
71 |
+ this.setArrowOrigin(sourceCenterY - resY); |
72 |
+ break; |
73 |
+diff --git a/js/ui/layout.js b/js/ui/layout.js |
74 |
+index d473ae0..f21fcca 100644 |
75 |
+--- a/js/ui/layout.js |
76 |
++++ b/js/ui/layout.js |
77 |
+@@ -369,6 +369,10 @@ LayoutManager.prototype = { |
78 |
+ // Removes @actor from the chrome |
79 |
+ removeChrome: function(actor) { |
80 |
+ this._chrome.removeActor(actor); |
81 |
++ }, |
82 |
++ |
83 |
++ findMonitorForActor: function(actor) { |
84 |
++ return this._chrome.findMonitorForActor(actor); |
85 |
+ } |
86 |
+ }; |
87 |
+ Signals.addSignalMethods(LayoutManager.prototype); |
88 |
+@@ -700,7 +704,7 @@ Chrome.prototype = { |
89 |
+ else if (this._inOverview) |
90 |
+ visible = true; |
91 |
+ else if (!actorData.visibleInFullscreen && |
92 |
+- this._findMonitorForActor(actorData.actor).inFullscreen) |
93 |
++ this.findMonitorForActor(actorData.actor).inFullscreen) |
94 |
+ visible = false; |
95 |
+ else |
96 |
+ visible = true; |
97 |
+@@ -762,7 +766,7 @@ Chrome.prototype = { |
98 |
+ |
99 |
+ // This call guarantees that we return some monitor to simplify usage of it |
100 |
+ // In practice all tracked actors should be visible on some monitor anyway |
101 |
+- _findMonitorForActor: function(actor) { |
102 |
++ findMonitorForActor: function(actor) { |
103 |
+ let [x, y] = actor.get_transformed_position(); |
104 |
+ let [w, h] = actor.get_transformed_size(); |
105 |
+ let monitor = this._findMonitorForRect(x, y, w, h); |
106 |
+-- |
107 |
+cgit v0.9.0.2 |
108 |
|
109 |
diff --git a/gnome-base/gnome-shell/files/gnome-shell-3.2.0-recorder-coglhandle.patch b/gnome-base/gnome-shell/files/gnome-shell-3.2.0-recorder-coglhandle.patch |
110 |
new file mode 100644 |
111 |
index 0000000..c9d3f41 |
112 |
--- /dev/null |
113 |
+++ b/gnome-base/gnome-shell/files/gnome-shell-3.2.0-recorder-coglhandle.patch |
114 |
@@ -0,0 +1,41 @@ |
115 |
+From 4e9e91fdce7b887bc2fea99b36b6fad4a5cea2c6 Mon Sep 17 00:00:00 2001 |
116 |
+From: Florian Müllner <fmuellner@×××××.org> |
117 |
+Date: Wed, 21 Sep 2011 22:58:08 +0000 |
118 |
+Subject: recorder: Use CoglHandle instead of CoglHandle* |
119 |
+ |
120 |
+The latter has always been wrong and should have been fixed a |
121 |
+while ago, but somehow we overlooked shell-recorder. |
122 |
+ |
123 |
+https://bugzilla.gnome.org/show_bug.cgi?id=659822 |
124 |
+--- |
125 |
+diff --git a/src/shell-recorder.c b/src/shell-recorder.c |
126 |
+index 9df14d3..a624389 100644 |
127 |
+--- a/src/shell-recorder.c |
128 |
++++ b/src/shell-recorder.c |
129 |
+@@ -54,7 +54,7 @@ struct _ShellRecorder { |
130 |
+ gboolean have_xfixes; |
131 |
+ int xfixes_event_base; |
132 |
+ |
133 |
+- CoglHandle *recording_icon; /* icon shown while playing */ |
134 |
++ CoglHandle recording_icon; /* icon shown while playing */ |
135 |
+ |
136 |
+ cairo_surface_t *cursor_image; |
137 |
+ int cursor_hot_x; |
138 |
+@@ -160,13 +160,13 @@ G_DEFINE_TYPE(ShellRecorder, shell_recorder, G_TYPE_OBJECT); |
139 |
+ * recording. The emblem is drawn *after* we record the frame so doesn't |
140 |
+ * show up in the frame. |
141 |
+ */ |
142 |
+-static CoglHandle * |
143 |
++static CoglHandle |
144 |
+ create_recording_icon (void) |
145 |
+ { |
146 |
+ cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 32, 32); |
147 |
+ cairo_t *cr; |
148 |
+ cairo_pattern_t *pat; |
149 |
+- CoglHandle *texture; |
150 |
++ CoglHandle texture; |
151 |
+ |
152 |
+ cr = cairo_create (surface); |
153 |
+ |
154 |
+-- |
155 |
+cgit v0.9.0.2 |
156 |
|
157 |
diff --git a/gnome-base/gnome-shell/files/gnome-shell-3.2.0-st-texture-cache-non-serialized-icons.patch b/gnome-base/gnome-shell/files/gnome-shell-3.2.0-st-texture-cache-non-serialized-icons.patch |
158 |
new file mode 100644 |
159 |
index 0000000..73b51da |
160 |
--- /dev/null |
161 |
+++ b/gnome-base/gnome-shell/files/gnome-shell-3.2.0-st-texture-cache-non-serialized-icons.patch |
162 |
@@ -0,0 +1,47 @@ |
163 |
+From e49a595f54b14d681ad01c8da1886ff659080e10 Mon Sep 17 00:00:00 2001 |
164 |
+From: Florian Müllner <fmuellner@×××××.org> |
165 |
+Date: Fri, 30 Sep 2011 17:57:09 +0000 |
166 |
+Subject: st-texture-cache: Don't cache GIcons which cannot be serialized |
167 |
+ |
168 |
+For GIcons we use g_icon_to_string() in the key, but the function |
169 |
+will return NULL if the icon cannot be serialized. As a result, |
170 |
+all non-serializable GIcons of the same size end up with the same |
171 |
+cache key - an example for this are contacts with avatars, which |
172 |
+currently all end up with the same image. |
173 |
+To fix, opt out of caching for GIcons which cannot be serialized. |
174 |
+ |
175 |
+https://bugzilla.gnome.org/show_bug.cgi?id=660585 |
176 |
+--- |
177 |
+diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c |
178 |
+index 24471bc..1e83a0d 100644 |
179 |
+--- a/src/st/st-texture-cache.c |
180 |
++++ b/src/st/st-texture-cache.c |
181 |
+@@ -1177,8 +1177,15 @@ load_gicon_with_colors (StTextureCache *cache, |
182 |
+ char *key; |
183 |
+ GtkIconTheme *theme; |
184 |
+ GtkIconInfo *info; |
185 |
++ StTextureCachePolicy policy; |
186 |
+ |
187 |
+ gicon_string = g_icon_to_string (icon); |
188 |
++ /* A return value of NULL indicates that the icon can not be serialized, |
189 |
++ * so don't have a unique identifier for it as a cache key, and thus can't |
190 |
++ * be cached. If it is cachable, we hardcode a policy of FOREVER here for |
191 |
++ * now; we should actually blow this away on icon theme changes probably */ |
192 |
++ policy = gicon_string != NULL ? ST_TEXTURE_CACHE_POLICY_FOREVER |
193 |
++ : ST_TEXTURE_CACHE_POLICY_NONE; |
194 |
+ if (colors) |
195 |
+ { |
196 |
+ /* This raises some doubts about the practice of using string keys */ |
197 |
+@@ -1210,9 +1217,7 @@ load_gicon_with_colors (StTextureCache *cache, |
198 |
+ { |
199 |
+ /* Transfer ownership of key */ |
200 |
+ request->key = key; |
201 |
+- /* hardcoded here for now; we should actually blow this away on |
202 |
+- * icon theme changes probably */ |
203 |
+- request->policy = ST_TEXTURE_CACHE_POLICY_FOREVER; |
204 |
++ request->policy = policy; |
205 |
+ request->icon = g_object_ref (icon); |
206 |
+ request->icon_info = info; |
207 |
+ request->width = request->height = size; |
208 |
+-- |
209 |
+cgit v0.9.0.2 |
210 |
|
211 |
diff --git a/gnome-base/gnome-shell/gnome-shell-3.2.0.ebuild b/gnome-base/gnome-shell/gnome-shell-3.2.0-r1.ebuild |
212 |
similarity index 90% |
213 |
rename from gnome-base/gnome-shell/gnome-shell-3.2.0.ebuild |
214 |
rename to gnome-base/gnome-shell/gnome-shell-3.2.0-r1.ebuild |
215 |
index 3aaed7a..186d8e6 100644 |
216 |
--- a/gnome-base/gnome-shell/gnome-shell-3.2.0.ebuild |
217 |
+++ b/gnome-base/gnome-shell/gnome-shell-3.2.0-r1.ebuild |
218 |
@@ -8,7 +8,7 @@ GCONF_DEBUG="no" |
219 |
GNOME2_LA_PUNT="yes" |
220 |
PYTHON_DEPEND="2:2.5" |
221 |
|
222 |
-inherit gnome2 python |
223 |
+inherit eutils gnome2 python |
224 |
if [[ ${PV} = 9999 ]]; then |
225 |
inherit gnome2-live |
226 |
fi |
227 |
@@ -113,9 +113,20 @@ pkg_setup() { |
228 |
BROWSER_PLUGIN_DIR=${EPREFIX}/usr/$(get_libdir)/nsbrowser/plugins" |
229 |
} |
230 |
|
231 |
+src_prepare() { |
232 |
+ gnome2_src_prepare |
233 |
+ # Fix recording; will be in next release |
234 |
+ epatch "${FILESDIR}/${P}-recorder-coglhandle.patch" |
235 |
+ # Fix multimonitor behavior; will be in next release |
236 |
+ epatch "${FILESDIR}/${P}-boxpointer-multimonitor.patch" |
237 |
+ # Fix different icons being cached identically; will be in next release |
238 |
+ epatch "${FILESDIR}/${P}-st-texture-cache-non-serialized-icons.patch" |
239 |
+} |
240 |
+ |
241 |
src_install() { |
242 |
gnome2_src_install |
243 |
python_convert_shebangs 2 "${D}"/usr/bin/gnome-shell-extension-tool |
244 |
+ |
245 |
} |
246 |
|
247 |
pkg_postinst() { |