handle minimize case

This commit is contained in:
Brad Hefta-Gaub 2014-03-14 17:22:35 -07:00
parent 2a03cf1bab
commit a5eb5d6515
2 changed files with 5 additions and 1 deletions

View file

@ -19,6 +19,10 @@ GLCanvas::GLCanvas() : QGLWidget(QGLFormat(QGL::NoDepthBuffer)),
{
}
bool GLCanvas::isThrottleRendering() const {
return _throttleRendering || Application::getInstance()->getWindow()->isMinimized();
}
void GLCanvas::initializeGL() {
Application::getInstance()->initializeGL();
setAttribute(Qt::WA_AcceptTouchEvents);

View file

@ -17,7 +17,7 @@ class GLCanvas : public QGLWidget {
Q_OBJECT
public:
GLCanvas();
bool isThrottleRendering() const { return _throttleRendering; }
bool isThrottleRendering() const;
protected:
QTimer _frameTimer;