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:
Jonas Ådahl
2018-01-03 15:55:38 +08:00
parent 2c0376c150
commit 47ea10b7c9
37 changed files with 436 additions and 326 deletions

View File

@ -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);