[gnome-shell] WindowManager: scale windows to their monitor's corner on minimize
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] WindowManager: scale windows to their monitor's corner on minimize
- Date: Sun, 16 Dec 2012 21:40:51 +0000 (UTC)
commit 1256af7b9a6afb4f8bab82636e41e6be8ee9eb5f
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Dec 15 03:24:23 2012 +0100
WindowManager: scale windows to their monitor's corner on minimize
We previously scaled windows to (primary.x, 0), which is wrong if the
primary monitor is not at y == 0. At the same time, change the policy
to pick the hot corner on the monitor the window is on, because that's
closest to where it will appear in the overview.
https://bugzilla.gnome.org/show_bug.cgi?id=690241
js/ui/windowManager.js | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 372d9a3..60e0837 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -247,16 +247,17 @@ const WindowManager = new Lang.Class({
*/
this._minimizing.push(actor);
- let primary = Main.layoutManager.primaryMonitor;
- let xDest = primary.x;
+ let monitor = Main.layoutManager.findMonitorForWindow(actor.meta_window);
+ let xDest = monitor.x;
+ let yDest = monitor.y;
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
- xDest += primary.width;
+ xDest += monitor.width;
Tweener.addTween(actor,
{ scale_x: 0.0,
scale_y: 0.0,
x: xDest,
- y: 0,
+ y: yDest,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._minimizeWindowDone,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]