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 3a4782cc64
commit 15ab285174

View File

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