[gnome-shell] workspace: Use mutter's work area calcuating rather than doing it manually



commit 0335f2726a7d2dbef689e74ad8de5827feca1c4c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Jan 27 23:17:53 2013 -0500

    workspace: Use mutter's work area calcuating rather than doing it manually
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692680

 js/ui/workspace.js |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 34ffcf4..bea9a61 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -295,17 +295,7 @@ const WindowClone = new Lang.Class({
 
         let [width, height] = this.actor.get_transformed_size();
 
-        let monitorIndex = this.metaWindow.get_monitor();
-        let monitor = Main.layoutManager.monitors[monitorIndex];
-        let availArea = new Meta.Rectangle({ x: monitor.x,
-                                             y: monitor.y,
-                                             width: monitor.width,
-                                             height: monitor.height });
-        if (monitorIndex == Main.layoutManager.primaryIndex) {
-            availArea.y += Main.panel.actor.height;
-            availArea.height -= Main.panel.actor.height;
-        }
-
+        let availArea = this.metaWindow.get_work_area_current_monitor();
         this.actor.x = _clamp(this.actor.x, availArea.x, availArea.x + availArea.width - width);
         this.actor.y = _clamp(this.actor.y, availArea.y, availArea.y + availArea.height - height);
     },


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