From: "Alexandre Restovtsev" <tetromino@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gnome:gnome-next commit in: gnome-base/gnome-shell/, gnome-base/gnome-shell/files/
Date: Sat, 1 Oct 2011 02:10:05 +0000 (UTC) [thread overview]
Message-ID: <e74deb455b878a6cdc0d179aa53d36fc8cea9013.tetromino@gentoo> (raw)
commit: e74deb455b878a6cdc0d179aa53d36fc8cea9013
Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Sat Oct 1 00:29:38 2011 +0000
Commit: Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Sat Oct 1 00:29:38 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=e74deb45
gnome-base/gnome-shell: add various patches
Add upstream patches to fix multimonitor behavior, to make the shell
recorder actually work, and to not cache unequal icons to the same
texture.
---
...gnome-shell-3.2.0-boxpointer-multimonitor.patch | 81 ++++++++++++++++++++
.../gnome-shell-3.2.0-recorder-coglhandle.patch | 41 ++++++++++
...2.0-st-texture-cache-non-serialized-icons.patch | 47 +++++++++++
...ll-3.2.0.ebuild => gnome-shell-3.2.0-r1.ebuild} | 13 +++-
4 files changed, 181 insertions(+), 1 deletions(-)
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
new file mode 100644
index 0000000..4d8497c
--- /dev/null
+++ b/gnome-base/gnome-shell/files/gnome-shell-3.2.0-boxpointer-multimonitor.patch
@@ -0,0 +1,81 @@
+From 7a8a189c483b48de581c490a44d69030ba7a6923 Mon Sep 17 00:00:00 2001
+From: Jasper St. Pierre <jstpierre@mecheye.net>
+Date: Thu, 22 Sep 2011 19:52:58 +0000
+Subject: boxpointer: Don't constrain box pointer to primary monitor
+
+A boxPointer should be able to be attached to any actor, not just ones on the
+primary monitor. Assume that the sourceActor doesn't straddle monitors, and
+constrain the boxPointer to the monitor the sourceActor is on.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=659861
+---
+diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js
+index 1523ef6..979e2d1 100644
+--- a/js/ui/boxpointer.js
++++ b/js/ui/boxpointer.js
+@@ -329,7 +329,7 @@ BoxPointer.prototype = {
+ // We also want to keep it onscreen, and separated from the
+ // edge by the same distance as the main part of the box is
+ // separated from its sourceActor
+- let primary = Main.layoutManager.primaryMonitor;
++ let monitor = Main.layoutManager.findMonitorForActor(sourceActor);
+ let themeNode = this.actor.get_theme_node();
+ let borderWidth = themeNode.get_length('-arrow-border-width');
+ let arrowBase = themeNode.get_length('-arrow-base');
+@@ -364,8 +364,8 @@ BoxPointer.prototype = {
+ case St.Side.BOTTOM:
+ resX = sourceCenterX - (halfMargin + (natWidth - margin) * alignment);
+
+- resX = Math.max(resX, primary.x + 10);
+- resX = Math.min(resX, primary.x + primary.width - (10 + natWidth));
++ resX = Math.max(resX, monitor.x + 10);
++ resX = Math.min(resX, monitor.x + monitor.width - (10 + natWidth));
+ this.setArrowOrigin(sourceCenterX - resX);
+ break;
+
+@@ -373,8 +373,8 @@ BoxPointer.prototype = {
+ case St.Side.RIGHT:
+ resY = sourceCenterY - (halfMargin + (natHeight - margin) * alignment);
+
+- resY = Math.max(resY, primary.y + 10);
+- resY = Math.min(resY, primary.y + primary.height - (10 + natHeight));
++ resY = Math.max(resY, monitor.y + 10);
++ resY = Math.min(resY, monitor.y + monitor.height - (10 + natHeight));
+
+ this.setArrowOrigin(sourceCenterY - resY);
+ break;
+diff --git a/js/ui/layout.js b/js/ui/layout.js
+index d473ae0..f21fcca 100644
+--- a/js/ui/layout.js
++++ b/js/ui/layout.js
+@@ -369,6 +369,10 @@ LayoutManager.prototype = {
+ // Removes @actor from the chrome
+ removeChrome: function(actor) {
+ this._chrome.removeActor(actor);
++ },
++
++ findMonitorForActor: function(actor) {
++ return this._chrome.findMonitorForActor(actor);
+ }
+ };
+ Signals.addSignalMethods(LayoutManager.prototype);
+@@ -700,7 +704,7 @@ Chrome.prototype = {
+ else if (this._inOverview)
+ visible = true;
+ else if (!actorData.visibleInFullscreen &&
+- this._findMonitorForActor(actorData.actor).inFullscreen)
++ this.findMonitorForActor(actorData.actor).inFullscreen)
+ visible = false;
+ else
+ visible = true;
+@@ -762,7 +766,7 @@ Chrome.prototype = {
+
+ // This call guarantees that we return some monitor to simplify usage of it
+ // In practice all tracked actors should be visible on some monitor anyway
+- _findMonitorForActor: function(actor) {
++ findMonitorForActor: function(actor) {
+ let [x, y] = actor.get_transformed_position();
+ let [w, h] = actor.get_transformed_size();
+ let monitor = this._findMonitorForRect(x, y, w, h);
+--
+cgit v0.9.0.2
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
new file mode 100644
index 0000000..c9d3f41
--- /dev/null
+++ b/gnome-base/gnome-shell/files/gnome-shell-3.2.0-recorder-coglhandle.patch
@@ -0,0 +1,41 @@
+From 4e9e91fdce7b887bc2fea99b36b6fad4a5cea2c6 Mon Sep 17 00:00:00 2001
+From: Florian Müllner <fmuellner@gnome.org>
+Date: Wed, 21 Sep 2011 22:58:08 +0000
+Subject: recorder: Use CoglHandle instead of CoglHandle*
+
+The latter has always been wrong and should have been fixed a
+while ago, but somehow we overlooked shell-recorder.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=659822
+---
+diff --git a/src/shell-recorder.c b/src/shell-recorder.c
+index 9df14d3..a624389 100644
+--- a/src/shell-recorder.c
++++ b/src/shell-recorder.c
+@@ -54,7 +54,7 @@ struct _ShellRecorder {
+ gboolean have_xfixes;
+ int xfixes_event_base;
+
+- CoglHandle *recording_icon; /* icon shown while playing */
++ CoglHandle recording_icon; /* icon shown while playing */
+
+ cairo_surface_t *cursor_image;
+ int cursor_hot_x;
+@@ -160,13 +160,13 @@ G_DEFINE_TYPE(ShellRecorder, shell_recorder, G_TYPE_OBJECT);
+ * recording. The emblem is drawn *after* we record the frame so doesn't
+ * show up in the frame.
+ */
+-static CoglHandle *
++static CoglHandle
+ create_recording_icon (void)
+ {
+ cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 32, 32);
+ cairo_t *cr;
+ cairo_pattern_t *pat;
+- CoglHandle *texture;
++ CoglHandle texture;
+
+ cr = cairo_create (surface);
+
+--
+cgit v0.9.0.2
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
new file mode 100644
index 0000000..73b51da
--- /dev/null
+++ b/gnome-base/gnome-shell/files/gnome-shell-3.2.0-st-texture-cache-non-serialized-icons.patch
@@ -0,0 +1,47 @@
+From e49a595f54b14d681ad01c8da1886ff659080e10 Mon Sep 17 00:00:00 2001
+From: Florian Müllner <fmuellner@gnome.org>
+Date: Fri, 30 Sep 2011 17:57:09 +0000
+Subject: st-texture-cache: Don't cache GIcons which cannot be serialized
+
+For GIcons we use g_icon_to_string() in the key, but the function
+will return NULL if the icon cannot be serialized. As a result,
+all non-serializable GIcons of the same size end up with the same
+cache key - an example for this are contacts with avatars, which
+currently all end up with the same image.
+To fix, opt out of caching for GIcons which cannot be serialized.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=660585
+---
+diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
+index 24471bc..1e83a0d 100644
+--- a/src/st/st-texture-cache.c
++++ b/src/st/st-texture-cache.c
+@@ -1177,8 +1177,15 @@ load_gicon_with_colors (StTextureCache *cache,
+ char *key;
+ GtkIconTheme *theme;
+ GtkIconInfo *info;
++ StTextureCachePolicy policy;
+
+ gicon_string = g_icon_to_string (icon);
++ /* A return value of NULL indicates that the icon can not be serialized,
++ * so don't have a unique identifier for it as a cache key, and thus can't
++ * be cached. If it is cachable, we hardcode a policy of FOREVER here for
++ * now; we should actually blow this away on icon theme changes probably */
++ policy = gicon_string != NULL ? ST_TEXTURE_CACHE_POLICY_FOREVER
++ : ST_TEXTURE_CACHE_POLICY_NONE;
+ if (colors)
+ {
+ /* This raises some doubts about the practice of using string keys */
+@@ -1210,9 +1217,7 @@ load_gicon_with_colors (StTextureCache *cache,
+ {
+ /* Transfer ownership of key */
+ request->key = key;
+- /* hardcoded here for now; we should actually blow this away on
+- * icon theme changes probably */
+- request->policy = ST_TEXTURE_CACHE_POLICY_FOREVER;
++ request->policy = policy;
+ request->icon = g_object_ref (icon);
+ request->icon_info = info;
+ request->width = request->height = size;
+--
+cgit v0.9.0.2
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
similarity index 90%
rename from gnome-base/gnome-shell/gnome-shell-3.2.0.ebuild
rename to gnome-base/gnome-shell/gnome-shell-3.2.0-r1.ebuild
index 3aaed7a..186d8e6 100644
--- a/gnome-base/gnome-shell/gnome-shell-3.2.0.ebuild
+++ b/gnome-base/gnome-shell/gnome-shell-3.2.0-r1.ebuild
@@ -8,7 +8,7 @@ GCONF_DEBUG="no"
GNOME2_LA_PUNT="yes"
PYTHON_DEPEND="2:2.5"
-inherit gnome2 python
+inherit eutils gnome2 python
if [[ ${PV} = 9999 ]]; then
inherit gnome2-live
fi
@@ -113,9 +113,20 @@ pkg_setup() {
BROWSER_PLUGIN_DIR=${EPREFIX}/usr/$(get_libdir)/nsbrowser/plugins"
}
+src_prepare() {
+ gnome2_src_prepare
+ # Fix recording; will be in next release
+ epatch "${FILESDIR}/${P}-recorder-coglhandle.patch"
+ # Fix multimonitor behavior; will be in next release
+ epatch "${FILESDIR}/${P}-boxpointer-multimonitor.patch"
+ # Fix different icons being cached identically; will be in next release
+ epatch "${FILESDIR}/${P}-st-texture-cache-non-serialized-icons.patch"
+}
+
src_install() {
gnome2_src_install
python_convert_shebangs 2 "${D}"/usr/bin/gnome-shell-extension-tool
+
}
pkg_postinst() {
next reply other threads:[~2011-10-01 2:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-01 2:10 Alexandre Restovtsev [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-09-07 6:30 [gentoo-commits] proj/gnome:gnome-next commit in: gnome-base/gnome-shell/, gnome-base/gnome-shell/files/ Alexandre Restovtsev
2011-09-02 5:15 Alexandre Restovtsev
2011-08-31 11:45 Alexandre Restovtsev
2011-08-30 21:55 Alexandre Restovtsev
2011-07-27 5:51 Alexandre Restovtsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e74deb455b878a6cdc0d179aa53d36fc8cea9013.tetromino@gentoo \
--to=tetromino@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox