mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 21:35:04 +02:00
Merge pull request #8865 from howard-stearns/fix-resize-on-plugin-switch
fix resize on plugin switch
This commit is contained in:
commit
f0766c76e1
1 changed files with 4 additions and 0 deletions
|
@ -5681,6 +5681,9 @@ void Application::updateDisplayMode() {
|
||||||
// Make the switch atomic from the perspective of other threads
|
// Make the switch atomic from the perspective of other threads
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(_displayPluginLock);
|
std::unique_lock<std::mutex> 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;
|
auto oldDisplayPlugin = _displayPlugin;
|
||||||
if (_displayPlugin) {
|
if (_displayPlugin) {
|
||||||
|
@ -5717,6 +5720,7 @@ void Application::updateDisplayMode() {
|
||||||
_offscreenContext->makeCurrent();
|
_offscreenContext->makeCurrent();
|
||||||
getApplicationCompositor().setDisplayPlugin(newDisplayPlugin);
|
getApplicationCompositor().setDisplayPlugin(newDisplayPlugin);
|
||||||
_displayPlugin = newDisplayPlugin;
|
_displayPlugin = newDisplayPlugin;
|
||||||
|
offscreenUi->getDesktop()->setProperty("repositionLocked", wasRepositionLocked);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit activeDisplayPluginChanged();
|
emit activeDisplayPluginChanged();
|
||||||
|
|
Loading…
Reference in a new issue