layout: new file handling shell layout
Remove ShellGlobal's monitor-related methods, and have Main.layoutManager provide that information instead. Move Main._relayout() to LayoutManager, and have other objects connect to the layout manager's 'monitors-changed' signal to know when the screen geometry has changed. https://bugzilla.gnome.org/show_bug.cgi?id=636963
This commit is contained in:
@ -1013,6 +1013,9 @@ Panel.prototype = {
|
||||
|
||||
Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here',
|
||||
{ sortGroup: CtrlAltTab.SortGroup.TOP });
|
||||
|
||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
|
||||
this._relayout();
|
||||
},
|
||||
|
||||
_xdndShowOverview: function (actor) {
|
||||
@ -1086,8 +1089,8 @@ Panel.prototype = {
|
||||
});
|
||||
},
|
||||
|
||||
relayout: function() {
|
||||
let primary = global.get_primary_monitor();
|
||||
_relayout: function() {
|
||||
let primary = Main.layoutManager.primaryMonitor;
|
||||
|
||||
this.actor.set_position(primary.x, primary.y);
|
||||
this.actor.set_size(primary.width, -1);
|
||||
|
Reference in New Issue
Block a user