From c3a3122d7b8fac842fd233e6a1131470c9ffb5ec Mon Sep 17 00:00:00 2001 From: Johannes Schultz Date: Thu, 25 Mar 2021 18:20:59 +0100 Subject: [PATCH] TBTray should no longer try to hook password prompts and other windows and thus do nothing to the main window. --- README.md | 2 +- dll/dll.rc | 2 +- dll/dll.vcxproj | 10 +++++----- loader/loader.rc | 2 +- loader/loader.vcxproj | 10 +++++----- loader/main.cpp | 3 ++- version.h | 2 +- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 7847897..d726bee 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ this way I didn't have to write most of the boilerplate code. Installation ------------ -Note: Requires _Microsoft Visual C++ Redistributable 2015_ or higher, with same bitness +Note: Requires _Microsoft Visual C++ 2015-2019 Redistributable_, with same bitness ([x86](https://aka.ms/vs/16/release/VC_redist.x86.exe), [x64](https://aka.ms/vs/16/release/VC_redist.x64.exe)) as your Thunderbird. diff --git a/dll/dll.rc b/dll/dll.rc index b432a59..d15a5bb 100644 --- a/dll/dll.rc +++ b/dll/dll.rc @@ -71,7 +71,7 @@ BEGIN VALUE "FileDescription", "Thunderbird Tray companion DLL" VALUE "FileVersion", PRODUCTVERSTR VALUE "InternalName", "TBTray.dll" - VALUE "LegalCopyright", "Copyright (C) 2020 Johannes Schultz" + VALUE "LegalCopyright", "Copyright (C) 2021 Johannes Schultz" VALUE "OriginalFilename", "TBTray.dll" VALUE "ProductName", "TBTray" VALUE "ProductVersion", PRODUCTVERSTR diff --git a/dll/dll.vcxproj b/dll/dll.vcxproj index 2a3d2f7..e3adbbc 100644 --- a/dll/dll.vcxproj +++ b/dll/dll.vcxproj @@ -23,32 +23,32 @@ {4B7C7DBC-D1D8-42BA-8349-A3D8430ACEFA} Win32Proj dll - 8.1 + 10.0 DynamicLibrary true - v141 + v142 Unicode DynamicLibrary false - v141 + v142 true Unicode DynamicLibrary true - v141 + v142 Unicode DynamicLibrary false - v141 + v142 true Unicode diff --git a/loader/loader.rc b/loader/loader.rc index a04b1d9..e322517 100644 --- a/loader/loader.rc +++ b/loader/loader.rc @@ -71,7 +71,7 @@ BEGIN VALUE "FileDescription", "Thunderbird Tray Loader" VALUE "FileVersion", PRODUCTVERSTR VALUE "InternalName", "TBTray.exe" - VALUE "LegalCopyright", "Copyright (C) 2020 Johannes Schultz" + VALUE "LegalCopyright", "Copyright (C) 2021 Johannes Schultz" VALUE "OriginalFilename", "TBTray.exe" VALUE "ProductName", "TBTray" VALUE "ProductVersion", PRODUCTVERSTR diff --git a/loader/loader.vcxproj b/loader/loader.vcxproj index 077cad4..bf07f44 100644 --- a/loader/loader.vcxproj +++ b/loader/loader.vcxproj @@ -22,32 +22,32 @@ 15.0 {F05C787D-64BD-485D-AD76-9291E96B1CDB} loader - 8.1 + 10.0 Application true - v141 + v142 Unicode Application false - v141 + v142 true Unicode Application true - v141 + v142 Unicode Application false - v141 + v142 true Unicode diff --git a/loader/main.cpp b/loader/main.cpp index bd7dfe3..1aad1c2 100644 --- a/loader/main.cpp +++ b/loader/main.cpp @@ -34,7 +34,8 @@ TCHAR *GetErrorMessage() static BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) { - if(hwnd) + // Only find resizable windows to avoid hooking password prompts etc. + if(hwnd && (GetWindowLong(hwnd, GWL_STYLE) & WS_SIZEBOX)) { TCHAR name[256] = {}; if(::GetClassName(hwnd, name, 256) > 0) diff --git a/version.h b/version.h index 9665ef7..b7b29a3 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #pragma once #define MAJORVER 0 #define MINORVER 10 -#define FIXVER 3 +#define FIXVER 4 #define PRODUCTVER MAJORVER,MINORVER,FIXVER,0 #define _STR(x) #x