From 6f283a4893239a1df84ec30b41590557161a99f8 Mon Sep 17 00:00:00 2001 From: howard-stearns Date: Thu, 20 Oct 2016 09:39:02 -0700 Subject: [PATCH] fix resize on plugin switch --- interface/src/Application.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index beefc9c67b..f8be4d637b 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5681,6 +5681,9 @@ void Application::updateDisplayMode() { // Make the switch atomic from the perspective of other threads { std::unique_lock lock(_displayPluginLock); + // Tell the desktop to no reposition (which requires plugin info), until we have set the new plugin, below. + bool wasRepositionLocked = offscreenUi->getDesktop()->property("repositionLocked").toBool(); + offscreenUi->getDesktop()->setProperty("repositionLocked", true); auto oldDisplayPlugin = _displayPlugin; if (_displayPlugin) { @@ -5717,6 +5720,7 @@ void Application::updateDisplayMode() { _offscreenContext->makeCurrent(); getApplicationCompositor().setDisplayPlugin(newDisplayPlugin); _displayPlugin = newDisplayPlugin; + offscreenUi->getDesktop()->setProperty("repositionLocked", wasRepositionLocked); } emit activeDisplayPluginChanged();