From 079041cf1ff3e3667e1c111a127fbd9cda8b7bfd Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 20 Feb 2013 02:18:14 +0100 Subject: [PATCH] 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(+) diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js index 6b50c6e1b..806d89a2f 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 a0fbbc819..552e032c3 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);