[gnome-shell/gnome-3-28] workspaceThumbnail: initialize porthole based on workArea



commit 4b6a57fabe9534c65fc0660eb0368901b990bc74
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Fri Jan 19 17:37:20 2018 +0100

    workspaceThumbnail: initialize porthole based on workArea
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792687
    
    
    (cherry picked from commit b99e304f1ee753959091ba2574474ac34dadb909)

 js/ui/workspaceThumbnail.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 7d5d2c08c..a1b0d9236 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -275,8 +275,8 @@ var WorkspaceThumbnail = new Lang.Class({
 
         this._createBackground();
 
-        let monitor = Main.layoutManager.primaryMonitor;
-        this.setPorthole(monitor.x, monitor.y, monitor.width, monitor.height);
+        let workArea = Main.layoutManager.getWorkAreaForMonitor(this.monitorIndex);
+        this.setPorthole(workArea.x, workArea.y, workArea.width, workArea.height);
 
         let windows = global.get_window_actors().filter(actor => {
             let win = actor.meta_window;
@@ -321,8 +321,6 @@ var WorkspaceThumbnail = new Lang.Class({
     },
 
     setPorthole(x, y, width, height) {
-        this._portholeX = x;
-        this._portholeY = y;
         this.actor.set_size(width, height);
         this._contents.set_position(-x, -y);
     },


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