From e022efe2a276e52015418ce8e37d77ca783101e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Tue, 29 Nov 2011 22:56:56 +0100 Subject: [PATCH] pick bottomRight as current hook, cannot be < 0 (ie. no position transform in this direction) --- libkwineffects/kwinanimationeffect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libkwineffects/kwinanimationeffect.cpp b/libkwineffects/kwinanimationeffect.cpp index 472c64d36d..551ac81e42 100644 --- a/libkwineffects/kwinanimationeffect.cpp +++ b/libkwineffects/kwinanimationeffect.cpp @@ -98,14 +98,14 @@ void AnimationEffect::animate( EffectWindow *w, Attribute a, uint meta, int ms, } else if (a == Position) { QRect area = effects->clientArea(ScreenArea , w); - QPoint pt = w->geometry().topLeft(); + QPoint pt = w->geometry().bottomRight(); // cannot be < 0 ;-) if (from.isValid()) { RELATIVE_XY(Source); from.set( relative[0] ? area.x() + from[0] * area.width() : from[0], relative[1] ? area.y() + from[1] * area.height() : from[1] ); } else { from.set(pt.x(), pt.y()); - setMetaData( SourceAnchor, AnimationEffect::Top|AnimationEffect::Left, meta ); + setMetaData( SourceAnchor, AnimationEffect::Bottom|AnimationEffect::Right, meta ); } if (to.isValid()) { @@ -114,7 +114,7 @@ void AnimationEffect::animate( EffectWindow *w, Attribute a, uint meta, int ms, relative[1] ? area.y() + to[1] * area.height() : to[1] ); } else { to.set(pt.x(), pt.y()); - setMetaData( TargetAnchor, AnimationEffect::Top|AnimationEffect::Left, meta ); + setMetaData( TargetAnchor, AnimationEffect::Bottom|AnimationEffect::Right, meta ); }