Skip to content

Commit

Permalink
TBTray should no longer try to hook password prompts and other window…
Browse files Browse the repository at this point in the history
…s and thus do nothing to the main window.
  • Loading branch information
sagamusix committed Mar 25, 2021
1 parent 8a881cc commit c3a3122
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion dll/dll.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions dll/dll.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@
<ProjectGuid>{4B7C7DBC-D1D8-42BA-8349-A3D8430ACEFA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dll</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion loader/loader.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions loader/loader.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,32 @@
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{F05C787D-64BD-485D-AD76-9291E96B1CDB}</ProjectGuid>
<RootNamespace>loader</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion loader/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c3a3122

Please sign in to comment.