From dec218a4441cb3233094ca8a486c4b7277081400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Thu, 29 May 2014 23:52:40 +0200 Subject: [PATCH] store geometry trail & use the correct oldGeometry geometryChanged is always executed before maximizeChanged, so we store the last changed geometry (through regular resize - the current geometry) and the second last one (used exclusively so far) which is the old geometry we want to use if the geometry change was caused by the maximize change CCBUG: 335023 Forward port of 3c8506992d3a05daa3f0752cc0f5e844acf2a8e2 from kde-workspace --- effects/maximize/package/contents/code/maximize.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/effects/maximize/package/contents/code/maximize.js b/effects/maximize/package/contents/code/maximize.js index f85fae8334..b0a6e3ee6a 100644 --- a/effects/maximize/package/contents/code/maximize.js +++ b/effects/maximize/package/contents/code/maximize.js @@ -31,6 +31,10 @@ var maximizeEffect = { var oldGeometry, newGeometry; oldGeometry = window.oldGeometry; newGeometry = window.geometry; + if (oldGeometry.width == newGeometry.width && oldGeometry.height == newGeometry.height) + oldGeometry = window.olderGeometry; + window.olderGeometry = window.oldGeometry; + window.oldGeometry = newGeometry; animate({ window: window, duration: maximizeEffect.duration, @@ -63,7 +67,8 @@ var maximizeEffect = { }, geometryChange: function (window, oldGeometry) { "use strict"; - window.oldGeometry = oldGeometry; + window.oldGeometry = window.geometry; + window.olderGeometry = oldGeometry; }, init: function () { "use strict";