layout: Use monitor index when adding bg managers

Don't assume that this._bgManagers.push() (i.e adding to the end) is always
correct.

On startup we call _createPrimaryBackground which passes in the primary index
which may not be 0.
This commit is contained in:
Adel Gadllah 2013-10-02 15:48:39 +02:00
parent 331c73002f
commit ac478727cc

View File

@ -347,7 +347,7 @@ const LayoutManager = new Lang.Class({
BackgroundMenu.addBackgroundMenu(bgManager.background.actor);
}));
this._bgManagers.push(bgManager);
this._bgManagers[monitorIndex] = bgManager;
return bgManager.background;
},