[gnome-shell] windowMenu: Port from Meta.ScreenDirection to Meta.DisplayDirection



commit 2d791a51c0f4ec445cf52cdb0ac6a0bf39cef452
Author: Jürg Billeter <j bitron ch>
Date:   Tue Sep 11 12:55:55 2018 +0200

    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

 js/ui/windowMenu.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js
index 32e3be698..11d4f17b6 100644
--- a/js/ui/windowMenu.js
+++ b/js/ui/windowMenu.js
@@ -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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]