diff --git a/interface/src/scripting/DesktopScriptingInterface.cpp b/interface/src/scripting/DesktopScriptingInterface.cpp
index 95d3bae332..32b5eb768d 100644
--- a/interface/src/scripting/DesktopScriptingInterface.cpp
+++ b/interface/src/scripting/DesktopScriptingInterface.cpp
@@ -52,6 +52,21 @@ static const QVariantMap DOCK_AREA {
{ "RIGHT", DockArea::RIGHT }
};
+/**jsdoc
+ * The possible "relative position anchors" of an InteractiveWindow
. Used when defining the `relativePosition` property of an `InteractiveWindow`.
+ * @typedef {object} InteractiveWindow.RelativePositionAnchors
+ * @property {InteractiveWindow.RelativePositionAnchor} TOP_LEFT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the top left of the Interface window.
+ * @property {InteractiveWindow.RelativePositionAnchor} TOP_RIGHT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the top right of the Interface window.
+ * @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_RIGHT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the bottom right of the Interface window.
+ * @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_LEFT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the bottom left of the Interface window.
+ */
+static const QVariantMap RELATIVE_POSITION_ANCHOR {
+ { "TOP_LEFT", RelativePositionAnchor::TOP_LEFT },
+ { "TOP_RIGHT", RelativePositionAnchor::TOP_RIGHT },
+ { "BOTTOM_RIGHT", RelativePositionAnchor::BOTTOM_RIGHT },
+ { "BOTTOM_LEFT", RelativePositionAnchor::BOTTOM_LEFT }
+};
+
DesktopScriptingInterface::DesktopScriptingInterface(QObject* parent, bool restricted)
: QObject(parent), _restricted(restricted) { }
@@ -99,6 +114,10 @@ QVariantMap DesktopScriptingInterface::getDockArea() {
return DOCK_AREA;
}
+QVariantMap DesktopScriptingInterface::getRelativePositionAnchor() {
+ return RELATIVE_POSITION_ANCHOR;
+}
+
void DesktopScriptingInterface::setHUDAlpha(float alpha) {
qApp->getApplicationCompositor().setAlpha(alpha);
}
diff --git a/interface/src/scripting/DesktopScriptingInterface.h b/interface/src/scripting/DesktopScriptingInterface.h
index e562a32543..c25f382891 100644
--- a/interface/src/scripting/DesktopScriptingInterface.h
+++ b/interface/src/scripting/DesktopScriptingInterface.h
@@ -42,6 +42,9 @@
* @property {InteractiveWindow.DockAreas} DockArea - The possible docking locations of an {@link InteractiveWindow}: top,
* bottom, left, or right of the Interface window.
* Read-only.
+ * @property {InteractiveWindow.RelativePositionAnchors} RelativePositionAnchor - The possible "relative position anchors" for an {@link InteractiveWindow}: top left,
+ * top right, bottom right, or bottom left of the Interface window.
+ * Read-only.
*/
class DesktopScriptingInterface : public QObject, public Dependency {
Q_OBJECT
@@ -50,6 +53,7 @@ class DesktopScriptingInterface : public QObject, public Dependency {
Q_PROPERTY(QVariantMap PresentationMode READ getPresentationMode CONSTANT FINAL)
Q_PROPERTY(QVariantMap DockArea READ getDockArea CONSTANT FINAL)
+ Q_PROPERTY(QVariantMap RelativePositionAnchor READ getRelativePositionAnchor CONSTANT FINAL)
Q_PROPERTY(int ALWAYS_ON_TOP READ flagAlwaysOnTop CONSTANT FINAL)
Q_PROPERTY(int CLOSE_BUTTON_HIDES READ flagCloseButtonHides CONSTANT FINAL)
@@ -106,7 +110,7 @@ private:
Q_INVOKABLE InteractiveWindowPointer createWindowOnThread(const QString& sourceUrl, const QVariantMap& properties, QThread* targetThread);
static QVariantMap getDockArea();
-
+ static QVariantMap getRelativePositionAnchor();
Q_INVOKABLE static QVariantMap getPresentationMode();
const bool _restricted;
};
diff --git a/interface/src/ui/InteractiveWindow.cpp b/interface/src/ui/InteractiveWindow.cpp
index e63c392a47..1c272323ae 100644
--- a/interface/src/ui/InteractiveWindow.cpp
+++ b/interface/src/ui/InteractiveWindow.cpp
@@ -39,6 +39,9 @@ static const char* const ADDITIONAL_FLAGS_PROPERTY = "additionalFlags";
static const char* const OVERRIDE_FLAGS_PROPERTY = "overrideFlags";
static const char* const SOURCE_PROPERTY = "source";
static const char* const TITLE_PROPERTY = "title";
+static const char* const RELATIVE_POSITION_ANCHOR_PROPERTY = "relativePositionAnchor";
+static const char* const RELATIVE_POSITION_PROPERTY = "relativePosition";
+static const char* const IS_FULL_SCREEN_WINDOW = "isFullScreenWindow";
static const char* const POSITION_PROPERTY = "position";
static const char* const INTERACTIVE_WINDOW_POSITION_PROPERTY = "interactiveWindowPosition";
static const char* const SIZE_PROPERTY = "size";
@@ -112,6 +115,14 @@ void InteractiveWindow::forwardKeyReleaseEvent(int key, int modifiers) {
QCoreApplication::postEvent(QCoreApplication::instance(), event);
}
+void InteractiveWindow::onMainWindowGeometryChanged(QRect geometry) {
+ if (_isFullScreenWindow) {
+ repositionAndResizeFullScreenWindow();
+ } else {
+ setPositionUsingRelativePositionAndAnchor(geometry);
+ }
+}
+
void InteractiveWindow::emitMainWindowResizeEvent() {
emit qApp->getWindow()->windowGeometryChanged(qApp->getWindow()->geometry());
}
@@ -184,22 +195,32 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap
*/
if (nativeWindowInfo.contains(DOCK_AREA_PROPERTY)) {
DockArea dockedArea = (DockArea) nativeWindowInfo[DOCK_AREA_PROPERTY].toInt();
+ int tempWidth = 0;
+ int tempHeight = 0;
switch (dockedArea) {
case DockArea::TOP:
dockArea = Qt::TopDockWidgetArea;
- _dockWidget->setFixedHeight(windowSize.height());
+ tempHeight = windowSize.height();
+ _dockWidget->setFixedHeight(tempHeight);
+ qApp->getWindow()->setDockedWidgetRelativePositionOffset(QSize(0, -tempHeight));
break;
case DockArea::BOTTOM:
dockArea = Qt::BottomDockWidgetArea;
- _dockWidget->setFixedHeight(windowSize.height());
+ tempHeight = windowSize.height();
+ _dockWidget->setFixedHeight(tempHeight);
+ qApp->getWindow()->setDockedWidgetRelativePositionOffset(QSize(0, tempHeight));
break;
case DockArea::LEFT:
dockArea = Qt::LeftDockWidgetArea;
- _dockWidget->setFixedWidth(windowSize.width());
+ tempWidth = windowSize.width();
+ _dockWidget->setFixedWidth(tempWidth);
+ qApp->getWindow()->setDockedWidgetRelativePositionOffset(QSize(-tempWidth, 0));
break;
case DockArea::RIGHT:
dockArea = Qt::RightDockWidgetArea;
- _dockWidget->setFixedWidth(windowSize.width());
+ tempWidth = windowSize.width();
+ _dockWidget->setFixedWidth(tempWidth);
+ qApp->getWindow()->setDockedWidgetRelativePositionOffset(QSize(tempWidth, 0));
break;
default:
@@ -255,6 +276,9 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap
if (properties.contains(TITLE_PROPERTY)) {
object->setProperty(TITLE_PROPERTY, properties[TITLE_PROPERTY].toString());
}
+ if (properties.contains(VISIBLE_PROPERTY)) {
+ object->setProperty(VISIBLE_PROPERTY, properties[INTERACTIVE_WINDOW_VISIBLE_PROPERTY].toBool());
+ }
if (properties.contains(SIZE_PROPERTY)) {
const auto size = vec2FromVariant(properties[SIZE_PROPERTY]);
object->setProperty(INTERACTIVE_WINDOW_SIZE_PROPERTY, QSize(size.x, size.y));
@@ -263,8 +287,21 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap
const auto position = vec2FromVariant(properties[POSITION_PROPERTY]);
object->setProperty(INTERACTIVE_WINDOW_POSITION_PROPERTY, QPointF(position.x, position.y));
}
- if (properties.contains(VISIBLE_PROPERTY)) {
- object->setProperty(VISIBLE_PROPERTY, properties[INTERACTIVE_WINDOW_VISIBLE_PROPERTY].toBool());
+ if (properties.contains(RELATIVE_POSITION_ANCHOR_PROPERTY)) {
+ _relativePositionAnchor = static_cast(properties[RELATIVE_POSITION_ANCHOR_PROPERTY].toInt());
+ }
+ if (properties.contains(RELATIVE_POSITION_PROPERTY)) {
+ _relativePosition = vec2FromVariant(properties[RELATIVE_POSITION_PROPERTY]);
+ setPositionUsingRelativePositionAndAnchor(qApp->getWindow()->geometry());
+ }
+ if (properties.contains(IS_FULL_SCREEN_WINDOW)) {
+ _isFullScreenWindow = properties[IS_FULL_SCREEN_WINDOW].toBool();
+ }
+
+ if (_isFullScreenWindow) {
+ QRect geo = qApp->getWindow()->geometry();
+ object->setProperty(INTERACTIVE_WINDOW_POSITION_PROPERTY, QPointF(geo.x(), geo.y()));
+ object->setProperty(INTERACTIVE_WINDOW_SIZE_PROPERTY, QSize(geo.width(), geo.height()));
}
// The qmlToScript method handles the thread-safety of this call. Because the QVariant argument
@@ -288,6 +325,8 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap
connect(object, SIGNAL(interactiveWindowVisibleChanged()), this, SLOT(parentNativeWindowToMainWindow()), Qt::QueuedConnection);
connect(object, SIGNAL(presentationModeChanged()), this, SLOT(parentNativeWindowToMainWindow()), Qt::QueuedConnection);
#endif
+
+ connect(qApp->getWindow(), &MainWindow::windowGeometryChanged, this, &InteractiveWindow::onMainWindowGeometryChanged, Qt::QueuedConnection);
QUrl sourceURL{ sourceUrl };
// If the passed URL doesn't correspond to a known scheme, assume it's a local file path
@@ -414,6 +453,87 @@ void InteractiveWindow::setPosition(const glm::vec2& position) {
}
}
+void InteractiveWindow::setNativeWindowPosition(const glm::vec2& position) {
+ if (!_qmlWindowProxy) {
+ return;
+ }
+
+ auto qmlWindow = _qmlWindowProxy->getQmlWindow();
+
+ if (!qmlWindow) {
+ return;
+ }
+ const auto nativeWindowProperty = qmlWindow->property("nativeWindow");
+ if (nativeWindowProperty.isNull() || !nativeWindowProperty.isValid()) {
+ return;
+ }
+ const auto nativeWindow = qvariant_cast(nativeWindowProperty);
+
+ nativeWindow->setPosition(QPoint(position.x, position.y));
+}
+
+RelativePositionAnchor InteractiveWindow::getRelativePositionAnchor() const {
+ return _relativePositionAnchor;
+}
+
+void InteractiveWindow::setRelativePositionAnchor(const RelativePositionAnchor& relativePositionAnchor) {
+ _relativePositionAnchor = relativePositionAnchor;
+ setPositionUsingRelativePositionAndAnchor(qApp->getWindow()->geometry());
+}
+
+glm::vec2 InteractiveWindow::getRelativePosition() const {
+ return _relativePosition;
+}
+
+void InteractiveWindow::setRelativePosition(const glm::vec2& relativePosition) {
+ _relativePosition = relativePosition;
+ setPositionUsingRelativePositionAndAnchor(qApp->getWindow()->geometry());
+}
+
+void InteractiveWindow::setPositionUsingRelativePositionAndAnchor(const QRect& mainWindowGeometry) {
+ RelativePositionAnchor relativePositionAnchor = getRelativePositionAnchor();
+ glm::vec2 relativePosition = getRelativePosition();
+
+ glm::vec2 newPosition;
+
+ switch (relativePositionAnchor) {
+ case RelativePositionAnchor::TOP_LEFT:
+ newPosition.x = mainWindowGeometry.x() + relativePosition.x;
+ newPosition.y = mainWindowGeometry.y() + relativePosition.y;
+ break;
+ case RelativePositionAnchor::TOP_RIGHT:
+ newPosition.x = mainWindowGeometry.x() + mainWindowGeometry.width() - relativePosition.x;
+ newPosition.y = mainWindowGeometry.y() + relativePosition.y;
+ break;
+ case RelativePositionAnchor::BOTTOM_RIGHT:
+ newPosition.x = mainWindowGeometry.x() + mainWindowGeometry.width() - relativePosition.x;
+ newPosition.y = mainWindowGeometry.y() + mainWindowGeometry.height() - relativePosition.y;
+ break;
+ case RelativePositionAnchor::BOTTOM_LEFT:
+ newPosition.x = mainWindowGeometry.x() + relativePosition.x;
+ newPosition.y = mainWindowGeometry.y() + mainWindowGeometry.height() - relativePosition.y;
+ break;
+ }
+
+ // Make sure we include the dimensions of the docked widget!
+ QSize dockedWidgetRelativePositionOffset = qApp->getWindow()->getDockedWidgetRelativePositionOffset();
+ newPosition.x = newPosition.x + dockedWidgetRelativePositionOffset.width();
+ newPosition.y = newPosition.y + dockedWidgetRelativePositionOffset.height();
+
+ if (_qmlWindowProxy) {
+ QMetaObject::invokeMethod(_qmlWindowProxy.get(), "writeProperty", Q_ARG(QString, INTERACTIVE_WINDOW_POSITION_PROPERTY),
+ Q_ARG(QVariant, QPointF(newPosition.x, newPosition.y)));
+ }
+ setNativeWindowPosition(newPosition);
+}
+
+void InteractiveWindow::repositionAndResizeFullScreenWindow() {
+ QRect windowGeometry = qApp->getWindow()->geometry();
+
+ setNativeWindowPosition(glm::vec2(windowGeometry.x(), windowGeometry.y()));
+ setNativeWindowSize(glm::vec2(windowGeometry.width(), windowGeometry.height()));
+}
+
glm::vec2 InteractiveWindow::getSize() const {
if (!_qmlWindowProxy) {
return {};
@@ -430,6 +550,26 @@ void InteractiveWindow::setSize(const glm::vec2& size) {
}
}
+void InteractiveWindow::setNativeWindowSize(const glm::vec2& size) {
+ if (!_qmlWindowProxy) {
+ return;
+ }
+
+ auto qmlWindow = _qmlWindowProxy->getQmlWindow();
+
+ if (!qmlWindow) {
+ return;
+ }
+ const auto nativeWindowProperty = qmlWindow->property("nativeWindow");
+ if (nativeWindowProperty.isNull() || !nativeWindowProperty.isValid()) {
+ return;
+ }
+ const auto nativeWindow = qvariant_cast(nativeWindowProperty);
+
+ nativeWindow->setWidth(size.x);
+ nativeWindow->setHeight(size.y);
+}
+
QString InteractiveWindow::getTitle() const {
if (!_qmlWindowProxy) {
return QString();
diff --git a/interface/src/ui/InteractiveWindow.h b/interface/src/ui/InteractiveWindow.h
index ba53684173..eb874b1db7 100644
--- a/interface/src/ui/InteractiveWindow.h
+++ b/interface/src/ui/InteractiveWindow.h
@@ -89,6 +89,14 @@ namespace InteractiveWindowEnums {
RIGHT
};
Q_ENUM_NS(DockArea);
+
+ enum RelativePositionAnchor {
+ TOP_LEFT,
+ TOP_RIGHT,
+ BOTTOM_RIGHT,
+ BOTTOM_LEFT
+ };
+ Q_ENUM_NS(RelativePositionAnchor);
}
using namespace InteractiveWindowEnums;
@@ -121,6 +129,8 @@ class InteractiveWindow : public QObject {
Q_PROPERTY(QString title READ getTitle WRITE setTitle)
Q_PROPERTY(glm::vec2 position READ getPosition WRITE setPosition)
+ Q_PROPERTY(RelativePositionAnchor relativePositionAnchor READ getRelativePositionAnchor WRITE setRelativePositionAnchor)
+ Q_PROPERTY(glm::vec2 relativePosition READ getRelativePosition WRITE setRelativePosition)
Q_PROPERTY(glm::vec2 size READ getSize WRITE setSize)
Q_PROPERTY(bool visible READ isVisible WRITE setVisible)
Q_PROPERTY(int presentationMode READ getPresentationMode WRITE setPresentationMode)
@@ -136,9 +146,26 @@ private:
Q_INVOKABLE glm::vec2 getPosition() const;
Q_INVOKABLE void setPosition(const glm::vec2& position);
+ Q_INVOKABLE void setNativeWindowPosition(const glm::vec2& position);
+
+ RelativePositionAnchor _relativePositionAnchor{ RelativePositionAnchor::TOP_LEFT };
+ Q_INVOKABLE RelativePositionAnchor getRelativePositionAnchor() const;
+ Q_INVOKABLE void setRelativePositionAnchor(const RelativePositionAnchor& position);
+
+ // This "relative position" is relative to the "relative position anchor" and excludes the window frame.
+ // This position will ALWAYS include the geometry of a docked widget, if one is present.
+ glm::vec2 _relativePosition{ 0.0f, 0.0f };
+ Q_INVOKABLE glm::vec2 getRelativePosition() const;
+ Q_INVOKABLE void setRelativePosition(const glm::vec2& position);
+
+ Q_INVOKABLE void setPositionUsingRelativePositionAndAnchor(const QRect& mainWindowGeometry);
+
+ bool _isFullScreenWindow{ false };
+ Q_INVOKABLE void repositionAndResizeFullScreenWindow();
Q_INVOKABLE glm::vec2 getSize() const;
Q_INVOKABLE void setSize(const glm::vec2& size);
+ Q_INVOKABLE void setNativeWindowSize(const glm::vec2& size);
Q_INVOKABLE void setVisible(bool visible);
Q_INVOKABLE bool isVisible() const;
@@ -320,6 +347,7 @@ protected slots:
void forwardKeyPressEvent(int key, int modifiers);
void forwardKeyReleaseEvent(int key, int modifiers);
void emitMainWindowResizeEvent();
+ void onMainWindowGeometryChanged(QRect geometry);
private:
std::shared_ptr _qmlWindowProxy;
diff --git a/libraries/ui/src/MainWindow.h b/libraries/ui/src/MainWindow.h
index 543f8ce9af..b37ac2ec1b 100644
--- a/libraries/ui/src/MainWindow.h
+++ b/libraries/ui/src/MainWindow.h
@@ -24,6 +24,10 @@ public:
~MainWindow();
static QWindow* findMainWindow();
+
+ // This offset is used for positioning children window relative to the main window.
+ void setDockedWidgetRelativePositionOffset(const QSize& newOffset) { _dockedWidgetRelativePositionOffset.setWidth(newOffset.width()); _dockedWidgetRelativePositionOffset.setHeight(newOffset.height()); }
+ QSize getDockedWidgetRelativePositionOffset() { return _dockedWidgetRelativePositionOffset; }
public slots:
void restoreGeometry();
void saveGeometry();
@@ -46,6 +50,7 @@ protected:
private:
Setting::Handle _windowGeometry;
Setting::Handle _windowState;
+ QSize _dockedWidgetRelativePositionOffset{ 0, 0 };
};
#endif /* defined(__hifi__MainWindow__) */
diff --git a/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js b/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js
index 2a5767a4c0..73fab98532 100644
--- a/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js
+++ b/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js
@@ -444,11 +444,6 @@ function updateEmoteIndicatorIcon(iconURL) {
}
-function onGeometryChanged(rect) {
- updateEmoteAppBarPosition();
-}
-
-
function onWindowMinimizedChanged(isMinimized) {
isWindowMinimized = isMinimized;
maybeChangeEmoteIndicatorVisibility(!isMinimized);
@@ -536,10 +531,11 @@ function showEmoteAppBar() {
x: EMOTE_APP_BAR_WIDTH_PX,
y: EMOTE_APP_BAR_HEIGHT_PX
},
- position: {
- x: Window.x + EMOTE_APP_BAR_LEFT_MARGIN,
- y: Window.y + Window.innerHeight - EMOTE_APP_BAR_BOTTOM_MARGIN
+ relativePosition: {
+ x: EMOTE_APP_BAR_LEFT_MARGIN,
+ y: EMOTE_APP_BAR_BOTTOM_MARGIN
},
+ relativePositionAnchor: Desktop.RelativePositionAnchor.BOTTOM_LEFT,
overrideFlags: EMOTE_APP_BAR_WINDOW_FLAGS
});
@@ -612,7 +608,6 @@ function setup() {
}, {});
Window.minimizedChanged.connect(onWindowMinimizedChanged);
- Window.geometryChanged.connect(onGeometryChanged);
HMD.displayModeChanged.connect(onDisplayModeChanged);
getSounds();
@@ -655,7 +650,6 @@ function unload() {
maybeDeleteRemoteIndicatorTimeout();
Window.minimizedChanged.disconnect(onWindowMinimizedChanged);
- Window.geometryChanged.disconnect(onGeometryChanged);
HMD.displayModeChanged.disconnect(onDisplayModeChanged);
if (keyPressSignalsConnected) {
diff --git a/scripts/simplifiedUI/ui/simplifiedUI.js b/scripts/simplifiedUI/ui/simplifiedUI.js
index 368f663308..43ba999da5 100644
--- a/scripts/simplifiedUI/ui/simplifiedUI.js
+++ b/scripts/simplifiedUI/ui/simplifiedUI.js
@@ -14,7 +14,6 @@
// START CONFIG OPTIONS
-var DOCKED_QML_SUPPORTED = true;
var TOOLBAR_NAME = "com.highfidelity.interface.toolbar.system";
var DEFAULT_SCRIPTS_PATH_PREFIX = ScriptDiscoveryService.defaultScriptsPath + "/";
// END CONFIG OPTIONS
@@ -378,14 +377,7 @@ function displayInitialLaunchWindow() {
initialLaunchWindow = Desktop.createWindow(INITIAL_LAUNCH_QML_PATH, {
title: INITIAL_LAUNCH_WINDOW_TITLE,
presentationMode: INITIAL_LAUNCH_PRESENTATION_MODE,
- size: {
- x: Window.innerWidth,
- y: Window.innerHeight + TOP_BAR_HEIGHT_PX
- },
- position: {
- x: Window.x,
- y: Window.y
- },
+ isFullScreenWindow: true,
overrideFlags: INITIAL_WINDOW_FLAGS
});
@@ -413,14 +405,7 @@ function displaySecondLaunchWindow() {
secondLaunchWindow = Desktop.createWindow(SECOND_LAUNCH_QML_PATH, {
title: SECOND_LAUNCH_WINDOW_TITLE,
presentationMode: SECOND_LAUNCH_PRESENTATION_MODE,
- size: {
- x: Window.innerWidth,
- y: Window.innerHeight + TOP_BAR_HEIGHT_PX
- },
- position: {
- x: Window.x,
- y: Window.y
- },
+ isFullScreenWindow: true,
overrideFlags: SECOND_WINDOW_FLAGS
});
@@ -581,16 +566,9 @@ function loadSimplifiedTopBar() {
y: TOP_BAR_HEIGHT_PX
}
};
- if (DOCKED_QML_SUPPORTED) {
- windowProps.presentationWindowInfo = {
- dockArea: Desktop.DockArea.TOP
- };
- } else {
- windowProps.position = {
- x: Window.x,
- y: Window.y
- };
- }
+ windowProps.presentationWindowInfo = {
+ dockArea: Desktop.DockArea.TOP
+ };
topBarWindow = Desktop.createWindow(TOP_BAR_QML_PATH, windowProps);
topBarWindow.fromQml.connect(onMessageFromTopBar);
@@ -655,36 +633,6 @@ function onHMDInputDeviceMutedChanged(isMuted) {
function onGeometryChanged(rect) {
updateInputDeviceMutedOverlay(Audio.muted);
updateOutputDeviceMutedOverlay(isOutputMuted());
- if (topBarWindow && !DOCKED_QML_SUPPORTED) {
- topBarWindow.size = {
- "x": rect.width,
- "y": TOP_BAR_HEIGHT_PX
- };
- topBarWindow.position = {
- "x": rect.x,
- "y": rect.y
- };
- }
- if (initialLaunchWindow) {
- initialLaunchWindow.size = {
- "x": Window.innerWidth,
- "y": Window.innerHeight + TOP_BAR_HEIGHT_PX
- };
- initialLaunchWindow.position = {
- "x": rect.x,
- "y": rect.y
- };
- }
- if (secondLaunchWindow) {
- secondLaunchWindow.size = {
- "x": Window.innerWidth,
- "y": Window.innerHeight + TOP_BAR_HEIGHT_PX
- };
- secondLaunchWindow.position = {
- "x": rect.x,
- "y": rect.y
- };
- }
}
var initialLaunchWindowIsMinimized = false;