From 9400def76b0dcc15944d4a0ced9d8e36f915640b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 19 Jul 2007 14:53:37 +0000 Subject: [PATCH] Set also original position when making a copy of a quad. svn path=/trunk/KDE/kdebase/workspace/; revision=689924 --- lib/kwineffects.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/kwineffects.cpp b/lib/kwineffects.cpp index 494892abdf..f4c4ef460d 100644 --- a/lib/kwineffects.cpp +++ b/lib/kwineffects.cpp @@ -316,6 +316,7 @@ EffectWindowGroup::~EffectWindowGroup() WindowQuad WindowQuad::makeSubQuad( float x1, float y1, float x2, float y2 ) const { assert( x1 < x2 && y1 < y2 && x1 >= left() && x2 <= right() && y1 >= top() && y2 <= bottom()); + checkUntransformed(); WindowQuad ret( *this ); ret.verts[ 0 ].px = x1; ret.verts[ 3 ].px = x1; @@ -325,6 +326,15 @@ WindowQuad WindowQuad::makeSubQuad( float x1, float y1, float x2, float y2 ) con ret.verts[ 1 ].py = y1; ret.verts[ 2 ].py = y2; ret.verts[ 3 ].py = y2; + // original x/y are supposed to be the same, no transforming is done here + ret.verts[ 0 ].ox = x1; + ret.verts[ 3 ].ox = x1; + ret.verts[ 1 ].ox = x2; + ret.verts[ 2 ].ox = x2; + ret.verts[ 0 ].oy = y1; + ret.verts[ 1 ].oy = y1; + ret.verts[ 2 ].oy = y2; + ret.verts[ 3 ].oy = y2; float tleft = ( x1 - left()) / ( right() - left()) * ( textureRight() - textureLeft()) + textureLeft(); float tright = ( x2 - left()) / ( right() - left()) * ( textureRight() - textureLeft()) + textureLeft(); float ttop = ( y1 - top()) / ( bottom() - top()) * ( textureBottom() - textureTop()) + textureTop();