From fc32ba9ce360983a5f1f0fb6bc5990588a402495 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 7 Nov 2018 09:26:34 -0800 Subject: [PATCH] fixing create app window on desktop --- interface/resources/qml/InteractiveWindow.qml | 8 ++++---- interface/src/Application.cpp | 2 +- scripts/system/edit.js | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/interface/resources/qml/InteractiveWindow.qml b/interface/resources/qml/InteractiveWindow.qml index 568f3e4532..aa12b7f790 100644 --- a/interface/resources/qml/InteractiveWindow.qml +++ b/interface/resources/qml/InteractiveWindow.qml @@ -54,7 +54,7 @@ Windows.Window { onSourceChanged: { if (dynamicContent) { dynamicContent.destroy(); - dynamicContent = null; + dynamicContent = null; } QmlSurface.load(source, contentHolder, function(newObject) { dynamicContent = newObject; @@ -117,7 +117,7 @@ Windows.Window { console.error("presentationMode should be set."); } } - + Component.onCompleted: { // Fix for parent loss on OSX: parent.heightChanged.connect(updateContentParent); @@ -132,7 +132,7 @@ Windows.Window { import QtQuick 2.3; import QtQuick.Window 2.3; - Windows.Window { + Window { id: root; Rectangle { color: hifi.colors.baseGray @@ -215,7 +215,7 @@ Windows.Window { nativeWindow.raise(); } } - + // Handle message traffic from our loaded QML to the script that launched us signal sendToScript(var message); diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 14822235f5..3a36afd53a 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -8490,7 +8490,7 @@ void Application::setShowBulletConstraintLimits(bool value) { } void Application::checkReadyToCreateLoginDialogOverlay() { - if (qApp->isHMDMode() && qApp->getActiveDisplayPlugin()->isDisplayVisible() && qApp->getLoginDialogPoppedUp() && _loginDialogOverlayID.isNull()) { + if (qApp->isHMDMode() && qApp->getLoginDialogPoppedUp() && _loginDialogOverlayID.isNull()) { createLoginDialogOverlay(); _loginPointerManager.setUp(); } else if (qApp->getLoginDialogPoppedUp()) { diff --git a/scripts/system/edit.js b/scripts/system/edit.js index 6425806771..b4c1764771 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -931,6 +931,7 @@ var toolBar = (function () { }; that.toggle = function () { + print("toggling"); that.setActive(!isActive); if (!isActive) { tablet.gotoHomeScreen(); @@ -2014,7 +2015,7 @@ function focusKey(value) { if (value === 0) { // on release cameraManager.enable(); if (selectionManager.hasSelection()) { - cameraManager.focus(selectionManager.worldPosition, selectionManager.worldDimensions, + cameraManager.focus(selectionManager.worldPosition, selectionManager.worldDimensions, Menu.isOptionChecked(MENU_EASE_ON_FOCUS)); } } @@ -2258,7 +2259,7 @@ var PropertiesTool = function (opts) { }; that.setVisible(false); - + function emitScriptEvent(data) { var dataString = JSON.stringify(data); webView.emitScriptEvent(dataString);