mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 07:14:11 +02:00
Use QApplication::applicationState to detect if we're in the background.
May want to expand upon this at some point; if we’re hidden we most definitely *do not* want to render anything
This commit is contained in:
parent
9c61f12926
commit
e27af75ad2
1 changed files with 3 additions and 6 deletions
|
@ -53,12 +53,9 @@ void GLCanvas::mouseReleaseEvent(QMouseEvent* event) {
|
|||
Application::getInstance()->mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
void GLCanvas::activeChanged()
|
||||
{
|
||||
if (!isActiveWindow())
|
||||
{
|
||||
if (!_throttleRendering)
|
||||
{
|
||||
void GLCanvas::activeChanged() {
|
||||
if (Application::applicationState() != Qt::ApplicationActive) {
|
||||
if (!_throttleRendering) {
|
||||
_frameTimer.start(_idleRenderInterval);
|
||||
_throttleRendering = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue