layout: Replace uses of find(Monitor|Index)ForWindow with window.get_monitor()

Mutter already does the math for us, so we shouldn't have to do it.
This commit is contained in:
Jasper St. Pierre
2013-01-28 14:47:51 -05:00
parent 0335f2726a
commit d9b33e01ee
2 changed files with 6 additions and 26 deletions

View File

@ -253,12 +253,9 @@ const WindowManager = new Lang.Class({
xScale = geom.width / actor.width;
yScale = geom.height / actor.height;
} else {
/* scale window down to 0x0. */
let monitor = Main.layoutManager.findMonitorForWindow(actor.meta_window);
xDest = monitor.x;
yDest = monitor.y;
xScale = 0.0;
yScale = 0.0;
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
let xDest = monitor.x;
let yDest = monitor.y;
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
xDest += monitor.width;
}