mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:25:52 +02:00
Don't reposition windows prior to selecting the initial display plugin
This commit is contained in:
parent
aa8d1d097e
commit
f90a351400
2 changed files with 22 additions and 2 deletions
|
@ -24,6 +24,13 @@ FocusScope {
|
||||||
readonly property int invalid_position: -9999;
|
readonly property int invalid_position: -9999;
|
||||||
property rect recommendedRect: Qt.rect(0,0,0,0);
|
property rect recommendedRect: Qt.rect(0,0,0,0);
|
||||||
property var expectedChildren;
|
property var expectedChildren;
|
||||||
|
property bool repositionLocked: true
|
||||||
|
|
||||||
|
onRepositionLockedChanged: {
|
||||||
|
if (!repositionLocked) {
|
||||||
|
d.handleSizeChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onHeightChanged: d.handleSizeChanged();
|
onHeightChanged: d.handleSizeChanged();
|
||||||
|
|
||||||
|
@ -52,11 +59,14 @@ FocusScope {
|
||||||
readonly property real menu: 8000
|
readonly property real menu: 8000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: d
|
id: d
|
||||||
|
|
||||||
function handleSizeChanged() {
|
function handleSizeChanged() {
|
||||||
|
if (desktop.repositionLocked) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var oldRecommendedRect = recommendedRect;
|
var oldRecommendedRect = recommendedRect;
|
||||||
var newRecommendedRectJS = (typeof Controller === "undefined") ? Qt.rect(0,0,0,0) : Controller.getRecommendedOverlayRect();
|
var newRecommendedRectJS = (typeof Controller === "undefined") ? Qt.rect(0,0,0,0) : Controller.getRecommendedOverlayRect();
|
||||||
var newRecommendedRect = Qt.rect(newRecommendedRectJS.x, newRecommendedRectJS.y,
|
var newRecommendedRect = Qt.rect(newRecommendedRectJS.x, newRecommendedRectJS.y,
|
||||||
|
@ -235,6 +245,10 @@ FocusScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
function repositionAll() {
|
function repositionAll() {
|
||||||
|
if (desktop.repositionLocked) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var oldRecommendedRect = recommendedRect;
|
var oldRecommendedRect = recommendedRect;
|
||||||
var oldRecommendedDimmensions = { x: oldRecommendedRect.width, y: oldRecommendedRect.height };
|
var oldRecommendedDimmensions = { x: oldRecommendedRect.width, y: oldRecommendedRect.height };
|
||||||
var newRecommendedRect = Controller.getRecommendedOverlayRect();
|
var newRecommendedRect = Controller.getRecommendedOverlayRect();
|
||||||
|
|
|
@ -963,6 +963,13 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
updateHeartbeat();
|
updateHeartbeat();
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
|
// Now that we've loaded the menu and thus switched to the previous display plugin
|
||||||
|
// we can unlock the desktop repositioning code, since all the positions will be
|
||||||
|
// relative to the desktop size for this plugin
|
||||||
|
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||||
|
offscreenUi->getDesktop()->setProperty("repositionLocked", false);
|
||||||
|
|
||||||
// Make sure we don't time out during slow operations at startup
|
// Make sure we don't time out during slow operations at startup
|
||||||
updateHeartbeat();
|
updateHeartbeat();
|
||||||
|
|
||||||
|
@ -5348,7 +5355,6 @@ void Application::updateDisplayMode() {
|
||||||
_displayPlugin = newDisplayPlugin;
|
_displayPlugin = newDisplayPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
emit activeDisplayPluginChanged();
|
emit activeDisplayPluginChanged();
|
||||||
|
|
||||||
// reset the avatar, to set head and hand palms back to a reasonable default pose.
|
// reset the avatar, to set head and hand palms back to a reasonable default pose.
|
||||||
|
|
Loading…
Reference in a new issue