diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2010-02-03 20:32:51 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2010-02-03 20:32:51 +0000 |
commit | fc2f043e7a526ce3404ad13bbb7a9dc71e7c3ab8 (patch) | |
tree | ed815519f3cc4f37c455876bab8b53780616191e | |
parent | amd64/x86 stable, bug #301071 (diff) | |
download | gentoo-2-fc2f043e7a526ce3404ad13bbb7a9dc71e7c3ab8.tar.gz gentoo-2-fc2f043e7a526ce3404ad13bbb7a9dc71e7c3ab8.tar.bz2 gentoo-2-fc2f043e7a526ce3404ad13bbb7a9dc71e7c3ab8.zip |
Fix bug #295511. This time proper package.
(Portage version: 2.2_rc62/cvs/Linux x86_64)
-rw-r--r-- | kde-base/kwin/ChangeLog | 9 | ||||
-rw-r--r-- | kde-base/kwin/files/4.3.5-magiclamp-minimize.patch | 151 | ||||
-rw-r--r-- | kde-base/kwin/kwin-4.3.5-r1.ebuild (renamed from kde-base/kwin/kwin-4.3.5.ebuild) | 3 |
3 files changed, 161 insertions, 2 deletions
diff --git a/kde-base/kwin/ChangeLog b/kde-base/kwin/ChangeLog index 11d458b8eb44..6a37232f7cc4 100644 --- a/kde-base/kwin/ChangeLog +++ b/kde-base/kwin/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for kde-base/kwin # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kwin/ChangeLog,v 1.186 2010/01/28 11:28:27 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kwin/ChangeLog,v 1.187 2010/02/03 20:32:51 scarabeus Exp $ + +*kwin-4.3.5-r1 (03 Feb 2010) + + 03 Feb 2010; Tomáš Chvátal <scarabeus@gentoo.org> + +files/4.3.5-magiclamp-minimize.patch, -kwin-4.3.5.ebuild, + +kwin-4.3.5-r1.ebuild: + Fix bug #295511. This time proper package. 28 Jan 2010; Tomáš Chvátal <scarabeus@gentoo.org> kwin-4.3.5.ebuild: Kwin needs opengl patch even for 4.3.5. Per bug #302548 diff --git a/kde-base/kwin/files/4.3.5-magiclamp-minimize.patch b/kde-base/kwin/files/4.3.5-magiclamp-minimize.patch new file mode 100644 index 000000000000..b3901f0c98b5 --- /dev/null +++ b/kde-base/kwin/files/4.3.5-magiclamp-minimize.patch @@ -0,0 +1,151 @@ +diff --git a/kwin/effects/magiclamp/magiclamp.cpp b/kwin/effects/magiclamp/magiclamp.cpp +index e1572cb..44406a2 100644 +--- a/kwin/effects/magiclamp/magiclamp.cpp ++++ b/kwin/effects/magiclamp/magiclamp.cpp +@@ -301,6 +301,11 @@ void MagicLampEffect::postPaintScreen() + effects->postPaintScreen(); + } + ++void MagicLampEffect::windowDeleted( EffectWindow* w ) ++{ ++ mTimeLineWindows.remove( w ); ++} ++ + void MagicLampEffect::windowMinimized( EffectWindow* w ) + { + mTimeLineWindows[w].setCurveShape(TimeLine::LinearCurve); +diff --git a/kwin/effects/magiclamp/magiclamp.h b/kwin/effects/magiclamp/magiclamp.h +index a7f134d..84bfa7e 100644 +--- a/kwin/effects/magiclamp/magiclamp.h ++++ b/kwin/effects/magiclamp/magiclamp.h +@@ -38,6 +38,7 @@ class MagicLampEffect + virtual void paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data ); + virtual void postPaintScreen(); + ++ virtual void windowDeleted( EffectWindow* c ); + virtual void windowMinimized( EffectWindow* c ); + virtual void windowUnminimized( EffectWindow* c ); + +diff --git a/kwin/effects/minimizeanimation/minimizeanimation.cpp b/kwin/effects/minimizeanimation/minimizeanimation.cpp +index 9432504..905a64b 100644 +--- a/kwin/effects/minimizeanimation/minimizeanimation.cpp ++++ b/kwin/effects/minimizeanimation/minimizeanimation.cpp +@@ -39,34 +39,39 @@ void MinimizeAnimationEffect::prePaintScreen( ScreenPrePaintData& data, int time + // whole screen won't be repainted, resulting in artefacts + data.mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; + +- effects->prePaintScreen(data, time); +- } +- +-void MinimizeAnimationEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int time ) +- { +- if( mTimeLineWindows.contains( w )) ++ QHash< EffectWindow*, TimeLine >::iterator entry = mTimeLineWindows.begin(); ++ bool erase = false; ++ while( entry != mTimeLineWindows.end() ) + { +- if( w->isMinimized() ) ++ TimeLine &timeline = entry.value(); ++ if( entry.key()->isMinimized() ) + { +- mTimeLineWindows[w].addTime(time); +- if( mTimeLineWindows[w].progress() >= 1.0f ) +- mTimeLineWindows.remove( w ); ++ timeline.addTime(time); ++ erase = (timeline.progress() >= 1.0f); + } + else + { +- mTimeLineWindows[w].removeTime(time); +- if( mTimeLineWindows[w].progress() <= 0.0f ) +- mTimeLineWindows.remove( w ); ++ timeline.removeTime(time); ++ erase = (timeline.progress() <= 0.0f); + } ++ if( erase ) ++ entry = mTimeLineWindows.erase( entry ); ++ else ++ ++entry; ++ } + +- // Schedule window for transformation if the animation is still in +- // progress +- if( mTimeLineWindows.contains( w )) +- { +- // We'll transform this window +- data.setTransformed(); +- w->enablePainting( EffectWindow::PAINT_DISABLED_BY_MINIMIZE ); +- } ++ effects->prePaintScreen(data, time); ++ } ++ ++void MinimizeAnimationEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int time ) ++ { ++ // Schedule window for transformation if the animation is still in ++ // progress ++ if( mTimeLineWindows.contains( w ) ) ++ { ++ // We'll transform this window ++ data.setTransformed(); ++ w->enablePainting( EffectWindow::PAINT_DISABLED_BY_MINIMIZE ); + } + + effects->prePaintWindow( w, data, time ); +@@ -74,10 +79,11 @@ void MinimizeAnimationEffect::prePaintWindow( EffectWindow* w, WindowPrePaintDat + + void MinimizeAnimationEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data ) + { +- if( mTimeLineWindows.contains( w )) ++ QHash< EffectWindow*, TimeLine >::const_iterator entry = mTimeLineWindows.find(w); ++ if( entry != mTimeLineWindows.constEnd() ) + { + // 0 = not minimized, 1 = fully minimized +- double progress = mTimeLineWindows[w].value(); ++ double progress = entry->value(); + + QRect geo = w->geometry(); + QRect icon = w->iconGeometry(); +@@ -107,18 +113,25 @@ void MinimizeAnimationEffect::postPaintScreen() + effects->postPaintScreen(); + } + ++void MinimizeAnimationEffect::windowDeleted( EffectWindow* w ) ++ { ++ mTimeLineWindows.remove( w ); ++ } ++ + void MinimizeAnimationEffect::windowMinimized( EffectWindow* w ) + { +- mTimeLineWindows[w].setCurveShape(TimeLine::EaseInCurve); +- mTimeLineWindows[w].setDuration( animationTime( 250 )); +- mTimeLineWindows[w].setProgress(0.0f); ++ TimeLine &timeline = mTimeLineWindows[w]; ++ timeline.setCurveShape(TimeLine::EaseInCurve); ++ timeline.setDuration( animationTime( 250 )); ++ timeline.setProgress(0.0f); + } + + void MinimizeAnimationEffect::windowUnminimized( EffectWindow* w ) + { +- mTimeLineWindows[w].setCurveShape(TimeLine::EaseOutCurve); +- mTimeLineWindows[w].setDuration( animationTime( 250 )); +- mTimeLineWindows[w].setProgress(1.0f); ++ TimeLine &timeline = mTimeLineWindows[w]; ++ timeline.setCurveShape(TimeLine::EaseOutCurve); ++ timeline.setDuration( animationTime( 250 )); ++ timeline.setProgress(1.0f); + } + + } // namespace +diff --git a/kwin/effects/minimizeanimation/minimizeanimation.h b/kwin/effects/minimizeanimation/minimizeanimation.h +index d8abd8c..96e4578 100644 +--- a/kwin/effects/minimizeanimation/minimizeanimation.h ++++ b/kwin/effects/minimizeanimation/minimizeanimation.h +@@ -42,6 +42,7 @@ class MinimizeAnimationEffect + virtual void paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data ); + virtual void postPaintScreen(); + ++ virtual void windowDeleted( EffectWindow* c ); + virtual void windowMinimized( EffectWindow* c ); + virtual void windowUnminimized( EffectWindow* c ); + diff --git a/kde-base/kwin/kwin-4.3.5.ebuild b/kde-base/kwin/kwin-4.3.5-r1.ebuild index 3481d34c0db3..0528bb462afb 100644 --- a/kde-base/kwin/kwin-4.3.5.ebuild +++ b/kde-base/kwin/kwin-4.3.5-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kwin/kwin-4.3.5.ebuild,v 1.2 2010/01/28 11:28:27 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kwin/kwin-4.3.5-r1.ebuild,v 1.1 2010/02/03 20:32:51 scarabeus Exp $ EAPI="2" @@ -36,6 +36,7 @@ RDEPEND="${COMMONDEPEND}" PATCHES=( "${FILESDIR}/4.3.3-fix_no_opengl.patch" + "${FILESDIR}/${PV}-magiclamp-minimize.patch" ) src_prepare() { |