diff --git a/interface/resources/qml/hifi/simplifiedUI/avatarApp/AvatarApp.qml b/interface/resources/qml/hifi/simplifiedUI/avatarApp/AvatarApp.qml
index 4c6615ebdc..957df6d584 100644
--- a/interface/resources/qml/hifi/simplifiedUI/avatarApp/AvatarApp.qml
+++ b/interface/resources/qml/hifi/simplifiedUI/avatarApp/AvatarApp.qml
@@ -88,7 +88,7 @@ Rectangle {
Image {
id: accent
- source: "../images/accent.svg"
+ source: "images/accent.svg"
anchors.top: parent.top
anchors.right: parent.right
width: 60
diff --git a/interface/resources/qml/hifi/simplifiedUI/images/accent.svg b/interface/resources/qml/hifi/simplifiedUI/avatarApp/images/accent.svg
similarity index 100%
rename from interface/resources/qml/hifi/simplifiedUI/images/accent.svg
rename to interface/resources/qml/hifi/simplifiedUI/avatarApp/images/accent.svg
diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml
index da3a6ab57c..60703a8062 100644
--- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml
+++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml
@@ -165,11 +165,21 @@ Rectangle {
}
Image {
- source: "../images/accent.svg"
+ source: {
+ if (root.activeTabView === "generalTabView") {
+ "images/accent1.svg"
+ } else if (root.activeTabView === "audioTabView") {
+ "images/accent2.svg"
+ } else if (root.activeTabView === "vrTabView") {
+ "images/accent3.svg"
+ } else {
+ "images/accent3.svg"
+ }
+ }
anchors.right: parent.right
- anchors.bottom: parent.bottom
- width: 94
- height: 175
+ anchors.top: tabContainer.bottom
+ width: 106
+ height: 200
}
diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/audio/Audio.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/audio/Audio.qml
index 7a19ab1a0f..4dc5e973fc 100644
--- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/audio/Audio.qml
+++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/audio/Audio.qml
@@ -57,7 +57,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: volumeControlsTitle
text: "Volume Controls"
Layout.preferredWidth: parent.width
@@ -154,7 +154,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: micControlsTitle
text: "Default Mute Controls"
Layout.maximumWidth: parent.width
@@ -196,7 +196,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: inputDeviceTitle
text: "Which input device?"
Layout.maximumWidth: parent.width
@@ -291,7 +291,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: outputDeviceTitle
text: "Which output device?"
Layout.maximumWidth: parent.width
diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/dev/Dev.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/dev/Dev.qml
index 996abc3bb6..a8c0a8f158 100644
--- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/dev/Dev.qml
+++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/dev/Dev.qml
@@ -47,7 +47,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: uiControlsTitle
text: "User Interface"
Layout.maximumWidth: parent.width
diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml
index 4ec3f59598..f56d0f33bd 100644
--- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml
+++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml
@@ -51,7 +51,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: avatarNameTagsTitle
text: "Avatar Name Tags"
Layout.maximumWidth: parent.width
@@ -99,7 +99,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: performanceTitle
text: "Graphics Settings"
Layout.maximumWidth: parent.width
@@ -147,7 +147,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: cameraTitle
text: "Camera View"
Layout.maximumWidth: parent.width
@@ -199,7 +199,7 @@ Flickable {
wrapMode: Text.Wrap
width: paintedWidth
height: paintedHeight
- size: 22
+ size: 14
color: simplifiedUI.colors.text.lightBlue
MouseArea {
diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/images/accent1.svg b/interface/resources/qml/hifi/simplifiedUI/settingsApp/images/accent1.svg
new file mode 100644
index 0000000000..885edef5ac
--- /dev/null
+++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/images/accent1.svg
@@ -0,0 +1,4 @@
+
diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/images/accent2.svg b/interface/resources/qml/hifi/simplifiedUI/settingsApp/images/accent2.svg
new file mode 100644
index 0000000000..027d9bb623
--- /dev/null
+++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/images/accent2.svg
@@ -0,0 +1,4 @@
+
diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/images/accent3.svg b/interface/resources/qml/hifi/simplifiedUI/settingsApp/images/accent3.svg
new file mode 100644
index 0000000000..07cc23ef1e
--- /dev/null
+++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/images/accent3.svg
@@ -0,0 +1,4 @@
+
diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/vr/VR.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/vr/VR.qml
index c7e3cc9fc2..9f5ed3ff8f 100644
--- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/vr/VR.qml
+++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/vr/VR.qml
@@ -57,7 +57,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: controlsTitle
text: "VR Movement Controls"
Layout.maximumWidth: parent.width
@@ -143,7 +143,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: micControlsTitle
text: "Default Mute Controls"
Layout.maximumWidth: parent.width
@@ -185,7 +185,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: inputDeviceTitle
text: "Which input device?"
Layout.maximumWidth: parent.width
@@ -280,7 +280,7 @@ Flickable {
Layout.preferredWidth: parent.width
spacing: 0
- HifiStylesUit.GraphikRegular {
+ HifiStylesUit.GraphikSemiBold {
id: outputDeviceTitle
text: "Which output device?"
Layout.maximumWidth: parent.width
diff --git a/interface/resources/qml/hifi/simplifiedUI/simplifiedConstants/SimplifiedConstants.qml b/interface/resources/qml/hifi/simplifiedUI/simplifiedConstants/SimplifiedConstants.qml
index 1f628b041d..5aa94d798e 100644
--- a/interface/resources/qml/hifi/simplifiedUI/simplifiedConstants/SimplifiedConstants.qml
+++ b/interface/resources/qml/hifi/simplifiedUI/simplifiedConstants/SimplifiedConstants.qml
@@ -183,7 +183,7 @@ QtObject {
readonly property QtObject settings: QtObject {
property int subtitleTopMargin: 2
- property int settingsGroupTopMargin: 24
+ property int settingsGroupTopMargin: 14
property int spacingBetweenSettings: 48
property int spacingBetweenRadiobuttons: 14
}
diff --git a/launchers/darwin/src/CredentialsRequest.m b/launchers/darwin/src/CredentialsRequest.m
index fd651bd98a..a5c24496ec 100644
--- a/launchers/darwin/src/CredentialsRequest.m
+++ b/launchers/darwin/src/CredentialsRequest.m
@@ -7,8 +7,9 @@
- (void) confirmCredentials:(NSString*)username :(NSString*)password {
NSLog(@"web request started");
+ NSString* trimmedUsername = [username stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSString *post = [NSString stringWithFormat:@"grant_type=password&username=%@&password=%@&scope=owner",
- [username stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet alphanumericCharacterSet]],
+ [trimmedUsername stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet alphanumericCharacterSet]],
[password stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet alphanumericCharacterSet]]];
NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding];
NSString *postLength = [NSString stringWithFormat:@"%ld", (unsigned long)[postData length]];
diff --git a/launchers/darwin/src/DownloadDomainContent.m b/launchers/darwin/src/DownloadDomainContent.m
index 7b0247a6f4..65878db356 100644
--- a/launchers/darwin/src/DownloadDomainContent.m
+++ b/launchers/darwin/src/DownloadDomainContent.m
@@ -54,7 +54,9 @@
-(void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error {
NSLog(@"completed; error: %@", error);
+ if (error) {
+ [[Launcher sharedLauncher] displayErrorPage];
+ }
}
-
@end
diff --git a/launchers/darwin/src/DownloadInterface.m b/launchers/darwin/src/DownloadInterface.m
index b957197567..7a8abf2e0a 100644
--- a/launchers/darwin/src/DownloadInterface.m
+++ b/launchers/darwin/src/DownloadInterface.m
@@ -66,6 +66,9 @@
-(void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error {
NSLog(@"completed; error: %@", error);
+ if (error) {
+ [[Launcher sharedLauncher] displayErrorPage];
+ }
}
diff --git a/launchers/darwin/src/OrganizationRequest.m b/launchers/darwin/src/OrganizationRequest.m
index 36a4228c96..abc104785a 100644
--- a/launchers/darwin/src/OrganizationRequest.m
+++ b/launchers/darwin/src/OrganizationRequest.m
@@ -4,15 +4,15 @@
#import "Launcher.h"
-static NSString* const organizationURL = @"https://s3.amazonaws.com/hifi-public/huffman/organizations/";
+static NSString* const organizationURL = @"https://orgs.highfidelity.com/organizations/";
@implementation OrganizationRequest
- (void) confirmOrganization:(NSString*)aOrganization :(NSString*)aUsername {
self.username = aUsername;
-
+ NSString* trimmedOrgString = [aOrganization stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
const char *cKey = LAUNCHER_HMAC_SECRET;
- const char *cData = [[aOrganization lowercaseString] cStringUsingEncoding:NSASCIIStringEncoding];
+ const char *cData = [[trimmedOrgString lowercaseString] cStringUsingEncoding:NSASCIIStringEncoding];
unsigned char cHMAC[CC_SHA256_DIGEST_LENGTH];
CCHmac(kCCHmacAlgSHA256, cKey, strlen(cKey), cData, strlen(cData), cHMAC);
NSData *HMACData = [NSData dataWithBytes:cHMAC length:sizeof(cHMAC)];
diff --git a/launchers/win32/LauncherDlg.cpp b/launchers/win32/LauncherDlg.cpp
index abf53b46b5..d3cae39013 100644
--- a/launchers/win32/LauncherDlg.cpp
+++ b/launchers/win32/LauncherDlg.cpp
@@ -120,8 +120,16 @@ BOOL CLauncherDlg::OnInitDialog() {
BOOL CLauncherDlg::PreTranslateMessage(MSG* pMsg) {
if ((pMsg->message == WM_KEYDOWN))
{
- if (pMsg->wParam == VK_RETURN)
- {
+ if (pMsg->wParam == 'A' && GetKeyState(VK_CONTROL) < 0) {
+ CWnd* wnd = GetFocus();
+ CWnd* myWnd = this->GetDlgItem(IDC_ORGNAME);
+ if (wnd && (wnd == this->GetDlgItem(IDC_ORGNAME) ||
+ wnd == this->GetDlgItem(IDC_USERNAME) ||
+ wnd == this->GetDlgItem(IDC_PASSWORD))) {
+ ((CEdit*)wnd)->SetSel(0, -1);
+ }
+ return TRUE;
+ } else if (pMsg->wParam == VK_RETURN) {
OnNextClicked();
return TRUE;
}
@@ -140,7 +148,6 @@ void CLauncherDlg::setCustomDialog() {
SetWindowLong(GetSafeHwnd(), GWL_EXSTYLE, lExStyle);
SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
- // theApp.setDialogOnFront();
}
void CLauncherDlg::OnPaint()
@@ -210,7 +217,7 @@ BOOL CLauncherDlg::getHQInfo(const CString& orgname) {
}
afx_msg void CLauncherDlg::OnTroubleClicked() {
- ShellExecute(0, NULL, TROUBLE_URL, NULL, NULL, SW_SHOWDEFAULT);
+ LauncherUtils::executeOnForeground(TROUBLE_URL, _T(""));
}
afx_msg void CLauncherDlg::OnNextClicked() {
@@ -584,10 +591,14 @@ void CLauncherDlg::OnTimer(UINT_PTR nIDEvent) {
} else {
theApp._manager.addToLog(_T("Start splash screen"));
setDrawDialog(DrawStep::DrawLogo);
- }
+ }
} else if (_splashStep > 100) {
_showSplash = false;
if (theApp._manager.shouldShutDown()) {
+ if (_applicationWND != NULL) {
+ ::SetForegroundWindow(_applicationWND);
+ ::SetActiveWindow(_applicationWND);
+ }
if (LauncherUtils::IsProcessRunning(L"interface.exe")) {
exit(0);
}
@@ -607,6 +618,9 @@ void CLauncherDlg::OnTimer(UINT_PTR nIDEvent) {
exit(0);
}
}
+ if (theApp._manager.shouldLaunch()) {
+ _applicationWND = theApp._manager.launchApplication();
+ }
}
void CLauncherDlg::setDrawDialog(DrawStep step, BOOL isUpdate) {
diff --git a/launchers/win32/LauncherDlg.h b/launchers/win32/LauncherDlg.h
index e998b342c1..beaaedcdb6 100644
--- a/launchers/win32/LauncherDlg.h
+++ b/launchers/win32/LauncherDlg.h
@@ -90,6 +90,8 @@ protected:
CStatic* m_username_banner;
CStatic* m_password_banner;
+ HWND _applicationWND { 0 };
+
void drawBackground(CHwndRenderTarget* pRenderTarget);
void drawLogo(CHwndRenderTarget* pRenderTarget);
void drawSmallLogo(CHwndRenderTarget* pRenderTarget);
diff --git a/launchers/win32/LauncherManager.cpp b/launchers/win32/LauncherManager.cpp
index 91bb80d4b8..35903a0887 100644
--- a/launchers/win32/LauncherManager.cpp
+++ b/launchers/win32/LauncherManager.cpp
@@ -34,7 +34,7 @@ void LauncherManager::init() {
addToLog(_T("Installed version: ") + currentVersion);
if (_latestVersion.Compare(currentVersion) == 0) {
addToLog(_T("Already running most recent build. Launching interface.exe"));
- launchApplication();
+ _shouldLaunch = TRUE;
_shouldShutdown = TRUE;
} else {
addToLog(_T("New build found. Updating"));
@@ -94,7 +94,7 @@ BOOL LauncherManager::installLauncher() {
// The installer is not running on the desired location and has to be installed
// Kill of running before self-copy
if (LauncherUtils::IsProcessRunning(LAUNCHER_EXE_FILENAME)) {
- ::ShellExecute(NULL, NULL, L"taskkill", L"/F /T /IM " + LAUNCHER_EXE_FILENAME, NULL, SW_HIDE);
+ ShellExecute(NULL, NULL, L"taskkill", L"/F /T /IM " + LAUNCHER_EXE_FILENAME, NULL, SW_HIDE);
}
CopyFile(appPath, instalationPath, FALSE);
}
@@ -218,24 +218,27 @@ BOOL LauncherManager::getInstalledVersion(const CString& path, CString& version)
}
-BOOL LauncherManager::launchApplication(const CString& tokensJSON) {
+HWND LauncherManager::launchApplication() {
CString installDir;
LauncherManager::getAndCreatePaths(PathType::Interface_Directory, installDir);
CString interfaceExe = installDir + _T("\\interface.exe");
- CString params1 = _T("--url \"") + _domainURL + ("\" ");
+ CString urlParam = _T("--url \"") + _domainURL + ("\" ");
CString scriptsURL = installDir + _T("\\scripts\\simplifiedUI");
- CString params2 = _T("--scripts \"") + scriptsURL + ("\" ");
+ CString scriptsParam = _T("--scripts \"") + scriptsURL + ("\" ");
CString cacheDir;
LauncherManager::getAndCreatePaths(PathType::Content_Directory, cacheDir);
- CString params3 = _T("--cache \"") + cacheDir + ("\" ");
- CString params4 = !_displayName.IsEmpty() ? _T("--displayName \"") + _displayName + ("\" ") : _T("");
- CString parsedTokens = tokensJSON;
- parsedTokens.Replace(_T("\""), _T("\\\""));
- CString params5 = !tokensJSON.IsEmpty() ? _T("--tokens \"") + parsedTokens + ("\"") : _T("");
- CString params = params1 + params2 + params3 + params4 + params5 + EXTRA_PARAMETERS;
-
- auto rs = ShellExecute(NULL, L"open", interfaceExe, params, NULL, SW_SHOW);
- return (rs != NULL);
+ CString cacheParam = _T("--cache \"") + cacheDir + ("\" ");
+ CString nameParam = !_displayName.IsEmpty() ? _T("--displayName \"") + _displayName + ("\" ") : _T("");
+ CString tokensParam = _T("");
+ if (!_tokensJSON.IsEmpty()) {
+ CString parsedTokens = _tokensJSON;
+ parsedTokens.Replace(_T("\""), _T("\\\""));
+ tokensParam = _T("--tokens \"");
+ tokensParam += parsedTokens + _T("\"");
+ }
+ CString params = urlParam + scriptsParam + cacheParam + nameParam + tokensParam + EXTRA_PARAMETERS;
+ _shouldLaunch = FALSE;
+ return LauncherUtils::executeOnForeground(interfaceExe, params);
}
BOOL LauncherManager::createConfigJSON() {
@@ -288,8 +291,8 @@ LauncherUtils::ResponseError LauncherManager::readConfigJSON(CString& version, C
LauncherUtils::ResponseError LauncherManager::readOrganizationJSON(const CString& hash) {
CString contentTypeJson = L"content-type:application/json";
CString response;
- CString url = _T("/hifi-public/huffman/organizations/") + hash + _T(".json");
- LauncherUtils::ResponseError error = LauncherUtils::makeHTTPCall(L"HQ Launcher", L"s3.amazonaws.com", url,
+ CString url = _T("/organizations/") + hash + _T(".json");
+ LauncherUtils::ResponseError error = LauncherUtils::makeHTTPCall(L"HQ Launcher", L"orgs.highfidelity.com", url,
contentTypeJson, CStringA(), response, false);
if (error != LauncherUtils::ResponseError::NoError) {
return error;
@@ -407,9 +410,11 @@ void LauncherManager::onZipExtracted(ZipType type, int size) {
addToLog(_T("Creating config.json"));
createConfigJSON();
addToLog(_T("Launching application."));
- launchApplication(_tokensJSON);
- addToLog(_T("Creating registry keys."));
- createApplicationRegistryKeys(size);
+ _shouldLaunch = TRUE;
+ if (!_shouldUpdate) {
+ addToLog(_T("Creating registry keys."));
+ createApplicationRegistryKeys(size);
+ }
_shouldShutdown = TRUE;
}
}
@@ -429,7 +434,7 @@ void LauncherManager::onFileDownloaded(DownloadType type) {
addToLog(_T("Installing content."));
installContent();
} else if (type == DownloadType::DownloadApplication) {
- addToLog(_T("Installing application."));
+ addToLog(_T("Installing application."));
extractApplication();
}
}
diff --git a/launchers/win32/LauncherManager.h b/launchers/win32/LauncherManager.h
index b0e212a097..6fa7efeeda 100644
--- a/launchers/win32/LauncherManager.h
+++ b/launchers/win32/LauncherManager.h
@@ -70,7 +70,7 @@ public:
BOOL deleteApplicationRegistryKeys();
BOOL createShortcuts();
BOOL deleteShortcuts();
- BOOL launchApplication(const CString& tokensJSON = _T(""));
+ HWND launchApplication();
BOOL uninstallApplication();
BOOL installLauncher();
@@ -79,6 +79,7 @@ public:
const CString& getdomainURL() const { return _domainURL; }
const CString& getVersion() const { return _version; }
BOOL shouldShutDown() const { return _shouldShutdown; }
+ BOOL shouldLaunch() const { return _shouldLaunch; }
BOOL needsUpdate() { return _shouldUpdate; }
BOOL needsUninstall() { return _shouldUninstall; }
void setDisplayName(const CString& displayName) { _displayName = displayName; }
@@ -108,6 +109,7 @@ private:
BOOL _shouldUpdate{ FALSE };
BOOL _shouldUninstall{ FALSE };
BOOL _shouldShutdown{ FALSE };
+ BOOL _shouldLaunch{ FALSE };
CStdioFile _logFile;
};
diff --git a/launchers/win32/LauncherUtils.cpp b/launchers/win32/LauncherUtils.cpp
index 0309671bc2..cfb8b765c5 100644
--- a/launchers/win32/LauncherUtils.cpp
+++ b/launchers/win32/LauncherUtils.cpp
@@ -13,6 +13,7 @@
#include
#include
#include
+
#pragma comment(lib, "winhttp")
#include "LauncherUtils.h"
@@ -450,3 +451,38 @@ BOOL LauncherUtils::deleteDirectoriesOnThread(const CString& applicationDir,
}
return FALSE;
}
+
+HWND LauncherUtils::executeOnForeground(const CString& path, const CString& params) {
+ SHELLEXECUTEINFO info;
+ info.cbSize = sizeof(SHELLEXECUTEINFO);
+ info.lpVerb = _T("open");
+ info.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NOASYNC | SEE_MASK_WAITFORINPUTIDLE;
+ info.hwnd = NULL;
+ info.lpVerb = NULL;
+ info.lpParameters = NULL;
+ info.lpDirectory = NULL;
+ info.nShow = SW_SHOWNORMAL;
+ info.hInstApp = NULL;
+ info.lpFile = path;
+ info.lpParameters = params;
+ HWND hwnd = NULL;
+ if (!ShellExecuteEx(&info)) {
+ return FALSE;
+ } else {
+ DWORD infopid = GetProcessId(info.hProcess);
+ AllowSetForegroundWindow(infopid);
+ hwnd = GetTopWindow(0);
+ while (hwnd) {
+ DWORD pid;
+ DWORD dwTheardId = ::GetWindowThreadProcessId(hwnd, &pid);
+ if (pid == infopid) {
+ SetForegroundWindow(hwnd);
+ SetActiveWindow(hwnd);
+ break;
+ }
+ hwnd = ::GetNextWindow(hwnd, GW_HWNDNEXT);
+ }
+ CloseHandle(info.hProcess);
+ }
+ return hwnd;
+}
diff --git a/launchers/win32/LauncherUtils.h b/launchers/win32/LauncherUtils.h
index 504212fcde..a1cc553128 100644
--- a/launchers/win32/LauncherUtils.h
+++ b/launchers/win32/LauncherUtils.h
@@ -87,6 +87,7 @@ public:
const CString& downloadsDir,
std::function callback);
static CString urlEncodeString(const CString& url);
+ static HWND executeOnForeground(const CString& path, const CString& params);
private:
// Threads
diff --git a/scripts/simplifiedUI/ui/simplifiedUI.js b/scripts/simplifiedUI/ui/simplifiedUI.js
index 84ee93ecbf..91d8096881 100644
--- a/scripts/simplifiedUI/ui/simplifiedUI.js
+++ b/scripts/simplifiedUI/ui/simplifiedUI.js
@@ -457,9 +457,19 @@ function onGeometryChanged(rect) {
}
}
+<<<<<<< HEAD
+=======
+var TIMEOUT_BEFORE_REHIDE_TOOLBAR_MS = 700;
+>>>>>>> f360adccbc827bb52dc4a73ebe2c6890e8be039e
function onDisplayModeChanged(isHMDMode) {
if (isHMDMode) {
Camera.setModeString("first person");
+ } else if (Settings.getValue("simplifiedUI/keepExistingUIAndScripts", false)) {
+ // works for now, but not a permanent fix by any means.
+ Script.setTimeout(function () {
+ var toolbar = Toolbars.getToolbar(TOOLBAR_NAME);
+ toolbar.writeProperty("visible", false);
+ }, TIMEOUT_BEFORE_REHIDE_TOOLBAR_MS);
}
}