[gnome-shell/wip/abono/maximize: 3/5] windowManager: Use sourceRect for consistency
- From: Alessandro Bono <abono src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/abono/maximize: 3/5] windowManager: Use sourceRect for consistency
- Date: Mon, 22 May 2017 21:57:18 +0000 (UTC)
commit acc743ce55212dab0e0553eaaa3e403528c1f6f8
Author: Alessandro Bono <abono gnome org>
Date: Sat May 20 17:04:08 2017 +0200
windowManager: Use sourceRect for consistency
To calculate the scale, use the dimensions of the
same type of object (i.e., frameRect width and height).
https://bugzilla.gnome.org/show_bug.cgi?id=766685
js/ui/windowManager.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 944ab67..20475ce 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1346,9 +1346,10 @@ const WindowManager = new Lang.Class({
let actorClone = actor.__fullscreenInfo.clone;
let targetRect = actor.meta_window.get_frame_rect();
+ let sourceRect = actor.__fullscreenInfo.oldRect;
- let scaleX = targetRect.width / actorClone.width;
- let scaleY = targetRect.height / actorClone.height;
+ let scaleX = targetRect.width / sourceRect.width;
+ let scaleY = targetRect.height / sourceRect.height;
this._resizing.push(actor);
@@ -1363,7 +1364,6 @@ const WindowManager = new Lang.Class({
transition: 'easeOutQuad'
});
- let sourceRect = actor.__fullscreenInfo.oldRect;
actor.translation_x = -(targetRect.x - sourceRect.x);
actor.translation_y = -(targetRect.y - sourceRect.y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]