diff --git a/scripts/developer/debugging/debugWindow.js b/scripts/developer/debugging/debugWindow.js index 84bd3c323c..c0474b97c5 100644 --- a/scripts/developer/debugging/debugWindow.js +++ b/scripts/developer/debugging/debugWindow.js @@ -68,14 +68,23 @@ var window = new OverlayWindow({ if (hasPosition) { window.setPosition(windowX, windowY); +}; + +function recenterWindow() { + window.setPosition(100, 100); } window.visibleChanged.connect(function() { if (!window.visible) { window.setVisible(true); + recenterWindow(); } }); +HMD.displayModeChanged.connect(function(isHMDMode) { + recenterWindow(); +}); + window.closed.connect(function () { Script.stop(); }); function shouldLogMessage(scriptFileName) {