[gnome-shell] BackgroundMenu: fix regression from new background handling



commit 079041cf1ff3e3667e1c111a127fbd9cda8b7bfd
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Wed Feb 20 02:18:14 2013 +0100

    BackgroundMenu: fix regression from new background handling
    
    BackgroundMenu must ensure the actor it attaches to is reactive, and
    the layout manager must create a background menu for the first background
    too.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694227

 js/ui/backgroundMenu.js |    1 +
 js/ui/layout.js         |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js
index 6b50c6e..806d89a 100644
--- a/js/ui/backgroundMenu.js
+++ b/js/ui/backgroundMenu.js
@@ -31,6 +31,7 @@ function addBackgroundMenu(actor) {
     let cursor = new St.Bin({ opacity: 0 });
     Main.uiGroup.add_actor(cursor);
 
+    actor.reactive = true;
     actor._backgroundMenu = new BackgroundMenu(cursor);
     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 a0fbbc8..552e032 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -333,6 +333,7 @@ const LayoutManager = new Lang.Class({
         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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]