From 0335f2726a7d2dbef689e74ad8de5827feca1c4c Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 27 Jan 2013 23:17:53 -0500 Subject: [PATCH] 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 file changed, 1 insertion(+), 11 deletions(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 34ffcf4aa..bea9a6197 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); },