diff --git a/examples/html/entityList.html b/examples/html/entityList.html
index 01061f1eb0..bbfa4d81b8 100644
--- a/examples/html/entityList.html
+++ b/examples/html/entityList.html
@@ -168,14 +168,16 @@
-
+
-
+
+
+
diff --git a/examples/html/style.css b/examples/html/style.css
index 8b52447ea2..7177b8c8ba 100644
--- a/examples/html/style.css
+++ b/examples/html/style.css
@@ -86,6 +86,20 @@ input[type=button] {
font-weight: bold;
}
+#entity-list-header {
+ padding: 0.5em;
+}
+
+#search-area {
+ width: 100%;
+ padding: 0.5em;
+ box-sizing: border-box;
+}
+
+#search-area input {
+ width: 100%;
+}
+
textarea, input {
margin: 0;
padding: 1.5pt;
@@ -120,6 +134,7 @@ table#entity-table {
}
#entity-table tr.selected {
+ color: rgb(43, 43, 43);
background-color: #AAA;
}
diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp
index 95b8cbb835..aa24711509 100644
--- a/interface/src/Application.cpp
+++ b/interface/src/Application.cpp
@@ -156,18 +156,27 @@ public:
bool nativeEventFilter(const QByteArray &eventType, void* msg, long* result) Q_DECL_OVERRIDE {
if (eventType == "windows_generic_MSG") {
MSG* message = (MSG*)msg;
+
if (message->message == UWM_IDENTIFY_INSTANCES) {
*result = UWM_IDENTIFY_INSTANCES;
return true;
}
- if (message->message == WM_SHOWWINDOW) {
- Application::getInstance()->getWindow()->showNormal();
+
+ if (message->message == UWM_SHOW_APPLICATION) {
+ MainWindow* applicationWindow = Application::getInstance()->getWindow();
+ if (applicationWindow->isMinimized()) {
+ applicationWindow->showNormal(); // Restores to windowed or maximized state appropriately.
+ }
+ Application::getInstance()->setActiveWindow(applicationWindow); // Flashes the taskbar icon if not focus.
+ return true;
}
+
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 true;
}
}
}
diff --git a/interface/src/Application.h b/interface/src/Application.h
index e131766309..d015d09035 100644
--- a/interface/src/Application.h
+++ b/interface/src/Application.h
@@ -117,6 +117,8 @@ static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-entities-commands.html
#ifdef Q_OS_WIN
static const UINT UWM_IDENTIFY_INSTANCES =
RegisterWindowMessage("UWM_IDENTIFY_INSTANCES_{8AB82783-B74A-4258-955B-8188C22AA0D6}");
+static const UINT UWM_SHOW_APPLICATION =
+ RegisterWindowMessage("UWM_SHOW_APPLICATION_{71123FD6-3DA8-4DC1-9C27-8A12A6250CBA}");
#endif
class Application;
diff --git a/interface/src/main.cpp b/interface/src/main.cpp
index 4881bd4ff4..64ecb2b9e7 100644
--- a/interface/src/main.cpp
+++ b/interface/src/main.cpp
@@ -8,6 +8,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
+#include
#include
#include
#include
@@ -36,7 +37,7 @@ static BOOL CALLBACK enumWindowsCallback(HWND hWnd, LPARAM lParam) {
#endif
-int main(int argc, const char * argv[]) {
+int main(int argc, const char* argv[]) {
#ifdef Q_OS_WIN
// Run only one instance of Interface at a time.
HANDLE mutex = CreateMutex(NULL, FALSE, "High Fidelity Interface");
@@ -46,15 +47,32 @@ int main(int argc, const char * argv[]) {
HWND otherInstance = NULL;
EnumWindows(enumWindowsCallback, (LPARAM)&otherInstance);
if (otherInstance) {
- ShowWindow(otherInstance, SW_RESTORE);
- SetForegroundWindow(otherInstance);
+ // Show other instance.
+ SendMessage(otherInstance, UWM_SHOW_APPLICATION, 0, 0);
- 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);
+ // Send command line --url value to other instance.
+ if (argc >= 3) {
+ QStringList arguments;
+ for (int i = 0; i < argc; i += 1) {
+ arguments << argv[i];
+ }
+
+ QCommandLineParser parser;
+ QCommandLineOption urlOption("url", "", "value");
+ parser.addOption(urlOption);
+ parser.process(arguments);
+
+ if (parser.isSet(urlOption)) {
+ QUrl url = QUrl(parser.value(urlOption));
+ if (url.isValid() && url.scheme() == HIFI_URL_SCHEME) {
+ QByteArray urlBytes = url.toString().toLatin1();
+ const char* urlChars = urlBytes.data();
+ COPYDATASTRUCT cds;
+ cds.cbData = urlBytes.length() + 1;
+ cds.lpData = (PVOID)urlChars;
+ SendMessage(otherInstance, WM_COPYDATA, 0, (LPARAM)&cds);
+ }
+ }
}
}
return 0;
diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp
index 9f569c9893..7f6c509626 100644
--- a/libraries/audio-client/src/AudioClient.cpp
+++ b/libraries/audio-client/src/AudioClient.cpp
@@ -135,6 +135,15 @@ AudioClient::AudioClient() :
updateTimer->start(DEVICE_CHECK_INTERVAL_MSECS);
}
+AudioClient::~AudioClient() {
+ if (_gverbLocal) {
+ gverb_free(_gverbLocal);
+ }
+ if (_gverb) {
+ gverb_free(_gverb);
+ }
+}
+
void AudioClient::reset() {
_receivedAudioStream.reset();
_stats.reset();
@@ -522,10 +531,17 @@ bool AudioClient::switchOutputToAudioDevice(const QString& outputDeviceName) {
void AudioClient::initGverb() {
// Initialize a new gverb instance
+ if (_gverbLocal) {
+ gverb_free(_gverbLocal);
+ }
_gverbLocal = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(),
_reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(),
_reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(),
_reverbOptions->getTailLevel());
+
+ if (_gverb) {
+ gverb_free(_gverb);
+ }
_gverb = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(),
_reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(),
_reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(),
diff --git a/libraries/audio-client/src/AudioClient.h b/libraries/audio-client/src/AudioClient.h
index ed487e4ea1..e55a116e06 100644
--- a/libraries/audio-client/src/AudioClient.h
+++ b/libraries/audio-client/src/AudioClient.h
@@ -186,6 +186,7 @@ signals:
protected:
AudioClient();
+ ~AudioClient();
private:
void outputFormatChanged();
diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp
index 1da0a7e09f..043bd43115 100644
--- a/libraries/fbx/src/FBXReader.cpp
+++ b/libraries/fbx/src/FBXReader.cpp
@@ -1166,7 +1166,6 @@ int matchTextureUVSetToAttributeChannel(const QString& texUVSetName, const QHash
FBXLight extractLight(const FBXNode& object) {
FBXLight light;
- int unkwnon = 0;
foreach (const FBXNode& subobject, object.children) {
QString childname = QString(subobject.name);
if (subobject.name == "Properties70") {