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
This commit is contained in:
Giovanni Campagna 2013-02-20 02:18:14 +01:00 committed by Ray Strode
parent b8df7798bf
commit 079041cf1f
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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);