[altTab] Position on the currently focused monitor
Show the popup on the currently focused monitor rather than on the primary. https://bugzilla.gnome.org/show_bug.cgi?id=609257
This commit is contained in:
parent
c88d21d487
commit
a74cef9d2f
@ -84,9 +84,9 @@ AltTabPopup.prototype = {
|
|||||||
this._appSwitcher.connect('item-activated', Lang.bind(this, this._appActivated));
|
this._appSwitcher.connect('item-activated', Lang.bind(this, this._appActivated));
|
||||||
this._appSwitcher.connect('item-entered', Lang.bind(this, this._appEntered));
|
this._appSwitcher.connect('item-entered', Lang.bind(this, this._appEntered));
|
||||||
|
|
||||||
let primary = global.get_primary_monitor();
|
let focus = global.get_focus_monitor();
|
||||||
this._appSwitcher.actor.x = primary.x + Math.floor((primary.width - this._appSwitcher.actor.width) / 2);
|
this._appSwitcher.actor.x = focus.x + Math.floor((focus.width - this._appSwitcher.actor.width) / 2);
|
||||||
this._appSwitcher.actor.y = primary.y + Math.floor((primary.height - this._appSwitcher.actor.height) / 2);
|
this._appSwitcher.actor.y = focus.y + Math.floor((focus.height - this._appSwitcher.actor.height) / 2);
|
||||||
|
|
||||||
this._appIcons = this._appSwitcher.icons;
|
this._appIcons = this._appSwitcher.icons;
|
||||||
|
|
||||||
@ -395,8 +395,8 @@ AltTabPopup.prototype = {
|
|||||||
thumbnailCenter = stageX + icon.width / 2;
|
thumbnailCenter = stageX + icon.width / 2;
|
||||||
} else {
|
} else {
|
||||||
// Center the thumbnails on the monitor
|
// Center the thumbnails on the monitor
|
||||||
let primary = global.get_primary_monitor();
|
let focus = global.get_focus_monitor();
|
||||||
thumbnailCenter = primary.x + primary.width / 2;
|
thumbnailCenter = focus.x + focus.width / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._thumbnails.actor.x = Math.floor(thumbnailCenter - this._thumbnails.actor.width / 2);
|
this._thumbnails.actor.x = Math.floor(thumbnailCenter - this._thumbnails.actor.width / 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user