Fix minimize bug; fix bug where FTUE window appears behind Interface window

This commit is contained in:
Zach Fox 2019-10-09 15:46:50 -07:00
parent 2220234d68
commit 609f6f9a25
2 changed files with 10 additions and 1 deletions

View file

@ -450,6 +450,7 @@ function onGeometryChanged(rect) {
function onWindowMinimizedChanged(isMinimized) {
isWindowMinimized = isMinimized;
maybeChangeEmoteIndicatorVisibility(!isMinimized);
}
@ -546,8 +547,12 @@ function showEmoteAppBar() {
}
// There is currently no property in the Window Scripting Interface to determine
// whether the Interface window is currently minimized. This feels like an oversight.
// We should add that functionality to the Window Scripting Interface, and remove `isWindowMinimized` below.
var isWindowMinimized = false;
function maybeChangeEmoteIndicatorVisibility(desiredVisibility) {
if (Window.minimized || HMD.active) {
if (isWindowMinimized || HMD.active) {
desiredVisibility = false;
}

View file

@ -363,6 +363,8 @@ var INITIAL_LAUNCH_QML_PATH = Script.resolvePath("./simplifiedFTUE/InitialLaunch
var INITIAL_LAUNCH_WINDOW_TITLE = "Initial Launch";
var INITIAL_LAUNCH_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE;
var INITIAL_WINDOW_FLAGS = 0x00000001 | // Qt::Window
0x00000008 | // Qt::Popup
0x00000002 | // Qt::Tool
0x00000800 | // Qt::FramelessWindowHint
0x40000000; // Qt::NoDropShadowWindowHint
var initialLaunchWindow = false;
@ -396,6 +398,8 @@ var SECOND_LAUNCH_QML_PATH = Script.resolvePath("simplifiedFTUE/SecondLaunchWind
var SECOND_LAUNCH_WINDOW_TITLE = "Second Launch";
var SECOND_LAUNCH_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE;
var SECOND_WINDOW_FLAGS = 0x00000001 | // Qt::Window
0x00000008 | // Qt::Popup
0x00000002 | // Qt::Tool
0x00000800 | // Qt::FramelessWindowHint
0x40000000; // Qt::NoDropShadowWindowHint
var secondLaunchWindow = false;