tetromino 14/03/15 22:13:55
Added: gnome-shell-3.10.4-fix-background-manager.patch
gnome-shell-3.10.4-bluetooth-gold.patch
Log:
Fix silent linking failure to gnome-bluetooth when using ld.gold (bug
#503952, thanks to Justin Lecher) and background corruption with multiple
minitors (bug #504530, thanks to Chandler Paul).
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key
CF0ADD61)
Revision Changes Path
1.1
gnome-base/gnome-shell/files/gnome-shell-3.10.4-fix-background-manager.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-shell/files/gnome-shell-3.10.4-fix-background-manager.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-shell/files/gnome-shell-3.10.4-fix-background-manager.patch?rev=1.1&content-type=text/plain
Index: gnome-shell-3.10.4-fix-background-manager.patch
===================================================================
>From 831bd07b0d6b7055fea8317f2cdf8fd4a408c36d Mon Sep 17 00:00:00 2001
From: Jasper St. Pierre <[email protected]>
Date: Thu, 7 Nov 2013 17:14:47 -0500
Subject: [PATCH] layout: Fix several issues with the background management code
If monitor-changed fires at startup, it will destroy all of the
backgrounds, but since this._isStartup is true, won't recreate any
of them. Additionally, since _bgManagers is indexed by monitor index,
if the primary index is not 0, it could become a sparse array (e.g.
[undefined, undefined, primaryBackground]), and our for loop will
crash trying to access properties of undefined.
Fix both of these issues by always creating background managers for
every monitor, hiding them on startup but only showing them after
the startup animation is complete.
One thing we need to watch out for is that while LayoutManager is
constructing, Main.uiGroup / Main.layoutManager will be undefined,
so addBackgroundMenu will fail. Fix this by passing down the uiGroup
to the background menu code.
https://bugzilla.gnome.org/show_bug.cgi?id=709313
diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js
index 06e698c..dcbbb39 100644
--- a/js/ui/backgroundMenu.js
+++ b/js/ui/backgroundMenu.js
@@ -13,7 +13,7 @@ const BackgroundMenu = new Lang.Class({
Name: 'BackgroundMenu',
Extends: PopupMenu.PopupMenu,
- _init: function(source) {
+ _init: function(source, layoutManager) {
this.parent(source, 0, St.Side.TOP);
this.addSettingsAction(_("Settings"), 'gnome-control-center.desktop');
@@ -22,17 +22,17 @@ const BackgroundMenu = new Lang.Class({
this.actor.add_style_class_name('background-menu');
- Main.uiGroup.add_actor(this.actor);
+ layoutManager.uiGroup.add_actor(this.actor);
this.actor.hide();
}
});
-function addBackgroundMenu(actor) {
+function addBackgroundMenu(actor, layoutManager) {
let cursor = new St.Bin({ opacity: 0 });
- Main.uiGroup.add_actor(cursor);
+ layoutManager.uiGroup.add_actor(cursor);
actor.reactive = true;
- actor._backgroundMenu = new BackgroundMenu(cursor);
+ actor._backgroundMenu = new BackgroundMenu(cursor, layoutManager);
actor._backgroundManager = new PopupMenu.PopupMenuManager({ actor: actor
});
actor._backgroundManager.addMenu(actor._backgroundMenu);
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 17073a6..80bae9d 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -352,26 +352,26 @@ const LayoutManager = new Lang.Class({
this.emit('hot-corners-changed');
},
- _createBackground: function(monitorIndex) {
+ _addBackgroundMenu: function(bgManager) {
+ BackgroundMenu.addBackgroundMenu(bgManager.background.actor, this);
+ },
+
+ _createBackgroundManager: function(monitorIndex) {
let bgManager = new Background.BackgroundManager({ container:
this._backgroundGroup,
layoutManager: this,
monitorIndex:
monitorIndex });
- BackgroundMenu.addBackgroundMenu(bgManager.background.actor);
-
- bgManager.connect('changed', Lang.bind(this, function() {
-
BackgroundMenu.addBackgroundMenu(bgManager.background.actor);
- }));
- this._bgManagers[monitorIndex] = bgManager;
+ bgManager.connect('changed', Lang.bind(this, this._addBackgroundMenu));
+ this._addBackgroundMenu(bgManager);
- return bgManager.background;
+ return bgManager;
},
- _createSecondaryBackgrounds: function() {
+ _showSecondaryBackgrounds: function() {
for (let i = 0; i < this.monitors.length; i++) {
if (i != this.primaryIndex) {
- let background = this._createBackground(i);
-
+ let background = this._bgManagers[i].background;
+ background.actor.show();
background.actor.opacity = 0;
Tweener.addTween(background.actor,
{ opacity: 255,
@@ -381,10 +381,6 @@ const LayoutManager = new Lang.Class({
}
},
- _createPrimaryBackground: function() {
- this._createBackground(this.primaryIndex);
- },
-
_updateBackgrounds: function() {
let i;
for (i = 0; i < this._bgManagers.length; i++)
@@ -395,11 +391,12 @@ const LayoutManager = new Lang.Class({
if (Main.sessionMode.isGreeter)
return;
- if (this._startingUp)
- return;
-
for (let i = 0; i < this.monitors.length; i++) {
- this._createBackground(i);
+ let bgManager = this._createBackgroundManager(i);
+ this._bgManagers.push(bgManager);
+
+ if (i != this.primaryIndex && this._startingUp)
+ bgManager.background.actor.hide();
}
},
@@ -595,7 +592,7 @@ const LayoutManager = new Lang.Class({
if (Main.sessionMode.isGreeter) {
this.panelBox.translation_y = -this.panelBox.height;
} else {
- this._createPrimaryBackground();
+ this._updateBackgrounds();
// We need to force an update of the regions now before we scale
// the UI group to get the coorect allocation for the struts.
@@ -673,7 +670,7 @@ const LayoutManager = new Lang.Class({
this.keyboardBox.show();
if (!Main.sessionMode.isGreeter) {
- this._createSecondaryBackgrounds();
+ this._showSecondaryBackgrounds();
global.window_group.remove_clip();
}
--
Gitg
1.1
gnome-base/gnome-shell/files/gnome-shell-3.10.4-bluetooth-gold.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-shell/files/gnome-shell-3.10.4-bluetooth-gold.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-shell/files/gnome-shell-3.10.4-bluetooth-gold.patch?rev=1.1&content-type=text/plain
Index: gnome-shell-3.10.4-bluetooth-gold.patch
===================================================================
>From 92ad0e5a9dca44249639d71a089bfd7159ee6f65 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <[email protected]>
Date: Sat, 15 Mar 2014 17:48:41 -0400
Subject: [PATCH] build: Add BLUETOOTH_LIBS to libgnome-shell's libadd for
ld.gold
For ld.gold, adding BLUETOOTH_LIBS to gnome_shell_LDADD has no effect:
the libgnome-bluetooth-applet must be linked to the binary that actually
uses a function from libgnome-bluetooth-applet, i.e. to libgnome-shell.
https://bugzilla.gnome.org/show_bug.cgi?id=726435
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 8041052..a4aefde 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -301,7 +301,7 @@ libgnome_shell_base_la_LIBADD = $(libgnome_shell_libadd)
libgnome_shell_base_la_CPPFLAGS = $(gnome_shell_cflags)
libgnome_shell_la_LDFLAGS = $(libgnome_shell_ldflags)
-libgnome_shell_la_LIBADD = $(GNOME_SHELL_LIBS) $(MUTTER_LIBS)
libgnome-shell-base.la
+libgnome_shell_la_LIBADD = $(GNOME_SHELL_LIBS) $(MUTTER_LIBS)
$(BLUETOOTH_LIBS) libgnome-shell-base.la
libgnome_shell_la_CPPFLAGS = $(MUTTER_CFLAGS) $(gnome_shell_cflags)
if HAVE_MUTTER_WAYLAND
--
1.9.0