diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-27 18:51:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-27 18:51:48 +0300 |
commit | af3bc46e4599fe9bc4c303183e9ba7c2fa8d9c34 (patch) | |
tree | ab409f03289b4fb27e5ab1a622b1ae51980178c6 /plugins/BossKeyPlus | |
parent | e8a8773ceb8e570207cef9659c30f79d32fb93ae (diff) |
fixes #1822 (bosskey + db_autobackups => hangup)
Diffstat (limited to 'plugins/BossKeyPlus')
-rw-r--r-- | plugins/BossKeyPlus/src/BossKey.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index e904cb65f9..f2212539c2 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -166,17 +166,20 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM) wchar_t szTemp[32];
GetClassName(hWnd, szTemp, 32);
- if (mir_wstrcmp(szTemp, L"MirandaThumbsWnd") == 0) // hide floating contacts
- {
+ if (!mir_wstrcmp(szTemp, L"MirandaThumbsWnd")) { // hide floating contacts
CallService("FloatingContacts/MainHideAllThumbs", 0, 0);
g_bOldSetting |= OLD_FLTCONT;
}
- else if (mir_wstrcmp(szTemp, L"PopupWnd2") == 0 || mir_wstrcmp(szTemp, L"YAPPWinClass") == 0) // destroy opened popups
+ else if (!mir_wstrcmp(szTemp, L"PopupWnd2") || !mir_wstrcmp(szTemp, L"YAPPWinClass")) // destroy opened popups
PUDeletePopup(hWnd);
else {
+ DWORD threadId = GetWindowThreadProcessId(hWnd, 0);
+ if (threadId != GetCurrentThreadId())
+ return false;
+
+ // add to list
HWND_ITEM *node = new HWND_ITEM;
node->hWnd = hWnd;
- // add to list
node->next = g_pMirWnds;
g_pMirWnds = node;
ShowWindow(hWnd, SW_HIDE);
|