windowMenu: Port from Meta.ScreenDirection to Meta.DisplayDirection
Meta.ScreenDirection no longer exists. This fixes window menus on multi-monitor systems. JS ERROR: TypeError: Meta.ScreenDirection is undefined _buildMenu@resource:///org/gnome/shell/ui/windowMenu.js:135:17
This commit is contained in:
parent
7778d1c308
commit
2d791a51c0
@ -132,7 +132,7 @@ var WindowMenu = new Lang.Class({
|
||||
if (nMonitors > 1 && monitorIndex >= 0) {
|
||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
|
||||
let dir = Meta.ScreenDirection.UP;
|
||||
let dir = Meta.DisplayDirection.UP;
|
||||
let upMonitorIndex =
|
||||
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
if (upMonitorIndex != -1) {
|
||||
@ -141,7 +141,7 @@ var WindowMenu = new Lang.Class({
|
||||
});
|
||||
}
|
||||
|
||||
dir = Meta.ScreenDirection.DOWN;
|
||||
dir = Meta.DisplayDirection.DOWN;
|
||||
let downMonitorIndex =
|
||||
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
if (downMonitorIndex != -1) {
|
||||
@ -150,7 +150,7 @@ var WindowMenu = new Lang.Class({
|
||||
});
|
||||
}
|
||||
|
||||
dir = Meta.ScreenDirection.LEFT;
|
||||
dir = Meta.DisplayDirection.LEFT;
|
||||
let leftMonitorIndex =
|
||||
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
if (leftMonitorIndex != -1) {
|
||||
@ -159,7 +159,7 @@ var WindowMenu = new Lang.Class({
|
||||
});
|
||||
}
|
||||
|
||||
dir = Meta.ScreenDirection.RIGHT;
|
||||
dir = Meta.DisplayDirection.RIGHT;
|
||||
let rightMonitorIndex =
|
||||
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
if (rightMonitorIndex != -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user