Remove usage of MetaScreen
Remove any usage of MetaScreen, as it has been removed from libmutter in the API version 3. The corresponding functionality has been moved into three different places: MetaDisplay, MetaX11Display (for X11 specific functionality) and MetaWorkspaceManager. https://bugzilla.gnome.org/show_bug.cgi?id=759538
This commit is contained in:
@ -126,15 +126,15 @@ var WindowMenu = new Lang.Class({
|
||||
}
|
||||
}
|
||||
|
||||
let screen = global.screen;
|
||||
let nMonitors = screen.get_n_monitors();
|
||||
let display = global.display;
|
||||
let nMonitors = display.get_n_monitors();
|
||||
let monitorIndex = window.get_monitor();
|
||||
if (nMonitors > 1 && monitorIndex >= 0) {
|
||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
|
||||
let dir = Meta.ScreenDirection.UP;
|
||||
let upMonitorIndex =
|
||||
screen.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
if (upMonitorIndex != -1) {
|
||||
this.addAction(_("Move to Monitor Up"), () => {
|
||||
window.move_to_monitor(upMonitorIndex);
|
||||
@ -143,7 +143,7 @@ var WindowMenu = new Lang.Class({
|
||||
|
||||
dir = Meta.ScreenDirection.DOWN;
|
||||
let downMonitorIndex =
|
||||
screen.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
if (downMonitorIndex != -1) {
|
||||
this.addAction(_("Move to Monitor Down"), () => {
|
||||
window.move_to_monitor(downMonitorIndex);
|
||||
@ -152,7 +152,7 @@ var WindowMenu = new Lang.Class({
|
||||
|
||||
dir = Meta.ScreenDirection.LEFT;
|
||||
let leftMonitorIndex =
|
||||
screen.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
if (leftMonitorIndex != -1) {
|
||||
this.addAction(_("Move to Monitor Left"), () => {
|
||||
window.move_to_monitor(leftMonitorIndex);
|
||||
@ -161,7 +161,7 @@ var WindowMenu = new Lang.Class({
|
||||
|
||||
dir = Meta.ScreenDirection.RIGHT;
|
||||
let rightMonitorIndex =
|
||||
screen.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
display.get_monitor_neighbor_index(monitorIndex, dir);
|
||||
if (rightMonitorIndex != -1) {
|
||||
this.addAction(_("Move to Monitor Right"), () => {
|
||||
window.move_to_monitor(rightMonitorIndex);
|
||||
|
Reference in New Issue
Block a user