diff options
author | Ken Moore <ken@ixsystems.com> | 2017-08-31 11:42:33 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-08-31 11:42:33 -0400 |
commit | 2ed1ee7459868dca7228d61202a38c7c9c3e23f8 (patch) | |
tree | 60d44c92e91f63662ceef064b9f9736f0ffca6ce /src-qt5/core/libLumina/RootSubWindow-animations.cpp | |
parent | A but more work on Lumina2: (diff) | |
download | lumina-2ed1ee7459868dca7228d61202a38c7c9c3e23f8.tar.gz lumina-2ed1ee7459868dca7228d61202a38c7c9c3e23f8.tar.bz2 lumina-2ed1ee7459868dca7228d61202a38c7c9c3e23f8.zip |
Get all the single-window interactions finished up.
Now the multiple types of animations will not conflict/overwrite each other, and the window itself will be properly "paused" for animations.
Also fix up some window resize calculation errors, so the offset to the mouse position is properly handled now
Diffstat (limited to 'src-qt5/core/libLumina/RootSubWindow-animations.cpp')
-rw-r--r-- | src-qt5/core/libLumina/RootSubWindow-animations.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src-qt5/core/libLumina/RootSubWindow-animations.cpp b/src-qt5/core/libLumina/RootSubWindow-animations.cpp index b1489ad6..54524838 100644 --- a/src-qt5/core/libLumina/RootSubWindow-animations.cpp +++ b/src-qt5/core/libLumina/RootSubWindow-animations.cpp @@ -19,6 +19,7 @@ QStringList RootSubWindow::validAnimations(NativeWindow::Property prop){ } void RootSubWindow::loadAnimation(QString name, NativeWindow::Property prop, QVariant nval){ + if(anim->state()==QAbstractAnimation::Running){ return; } //already running animResetProp.clear(); //Special case - random animation each time if(name=="random"){ @@ -73,7 +74,6 @@ void RootSubWindow::loadAnimation(QString name, NativeWindow::Property prop, QVa } //end of Visibility animation else if(prop == NativeWindow::Size){ //This is pretty much all geometry animations where the window is visible->visible - animResetProp = QVariant(); //reset this - not needed here anim->setPropertyName("geometry"); anim->setStartValue(this->geometry()); anim->setEndValue(nval.toRect()); @@ -104,11 +104,11 @@ void RootSubWindow::animFinished(){ //qDebug() << "Sub Window geometry:" << clientg; WIN->setProperties(QList< NativeWindow::Property>() << NativeWindow::Size << NativeWindow::GlobalPos, QList<QVariant>() << clientg.size() << clientg.topLeft() ); - WinWidget->resyncWindow(); //also let the window know about the current geometry } } + WinWidget->resyncWindow(); //also let the window know about the current geometry } animResetProp = QVariant(); //clear the variable - QTimer::singleShot(10, WinWidget, SLOT(resume()) ); - + //QTimer::singleShot(10, WinWidget, SLOT(resume()) ); + WinWidget->resume(); } |