diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 03921ec689..ed8ad8c4d6 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -166,6 +166,13 @@ public: if (message->message == WM_SHOWWINDOW) { Application::getInstance()->getWindow()->showNormal(); } + if (message->message == WM_COPYDATA) { + COPYDATASTRUCT* pcds = (COPYDATASTRUCT*)(message->lParam); + QUrl url = QUrl((const char*)(pcds->lpData)); + if (url.isValid() && url.scheme() == HIFI_URL_SCHEME) { + DependencyManager::get()->handleLookupString(url.toString()); + } + } } return false; } diff --git a/interface/src/main.cpp b/interface/src/main.cpp index 0f20f09e25..d12a2761ed 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -15,6 +15,7 @@ #include +#include "AddressManager.h" #include "Application.h" #ifdef Q_OS_WIN @@ -48,6 +49,14 @@ int main(int argc, const char * argv[]) { if (otherInstance) { ShowWindow(otherInstance, SW_RESTORE); SetForegroundWindow(otherInstance); + + QUrl url = QUrl(argv[1]); + if (url.isValid() && url.scheme() == HIFI_URL_SCHEME) { + COPYDATASTRUCT cds; + cds.cbData = strlen(argv[1]) + 1; + cds.lpData = (PVOID)argv[1]; + SendMessage(otherInstance, WM_COPYDATA, 0, (LPARAM)&cds); + } } return 0; }