stop animators, when the window becomes invisible

This commit is contained in:
Uwe Rathmann 2019-09-12 10:44:06 +02:00
parent dfa0449a9b
commit 4d0a80ce6d

View File

@ -148,6 +148,9 @@ void QskAnimatorDriver::registerAnimator( QskAnimator* animator )
connect( window, &QQuickWindow::frameSwapped,
this, [ this, window ]() { scheduleUpdate( window ); } );
connect( window, &QWindow::visibleChanged,
this, [ this, window ]( bool on ) { if ( !on ) removeWindow( window ); } );
connect( window, &QObject::destroyed,
this, [ this, window ]( QObject* ) { removeWindow( window ); } );