From 382de2b4aa2e02e77fd56728d6962bc0666fccc7 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 9 Sep 2015 14:09:01 -0700 Subject: [PATCH] Fix possible hang when switching out of Oculus mode --- interface/src/Application.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 08a8af89f0..714a2593b6 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4761,9 +4761,11 @@ void Application::updateDisplayMode() { qDebug() << "Deferring plugin switch until out of painting"; // Have the old plugin stop requesting renders oldDisplayPlugin->stop(); - QCoreApplication::postEvent(this, new LambdaEvent([this] { + QTimer* timer = new QTimer(); + timer->singleShot(500, [this, timer] { + timer->deleteLater(); updateDisplayMode(); - })); + }); return; }