sagamusix / TBTray

Fixups for Thunderbird's tray icon for Windows
GNU General Public License v3.0
106 stars 13 forks source link

32bit only? #1

Closed theodorius123 closed 4 years ago

theodorius123 commented 5 years ago

Hey! Are you planning a 64bit-version? Would it be a lot of work?

thanks!!!

sagamusix commented 5 years ago

It's no extra work but I wasn't aware that there are (official) 64-bit Thunderbird binaries for Windows.

chumakovs commented 5 years ago

I'm migrating from Seamonkey to Thunderbird x64 and recompiled TBTray 64-bit with VS2019. This requires the small patch below to run on Windows 10. Unfortunately this is not all - there is no WM_NCLBUTTONDOWN or WM_SYSCOMMAND message when I click minimize or close buttons in windows title (I can see only WM_NCLBUTTONDOWN + HTCAPTION). So only Alt+F4 works for now.

diff --git a/loader/main.cpp b/loader/main.cpp index 38e04c4..2bd6276 100644 --- a/loader/main.cpp +++ b/loader/main.cpp @@ -70,6 +70,8 @@ static void CALLBACK TimerProc(HWND, UINT, UINT_PTR idTimer, DWORD) lstrcpy(dllName + dllNameLen - 3, _T("dll")); HMODULE dll = LoadLibrary(dllName); HOOKPROC hookProc = (HOOKPROC)GetProcAddress(dll, "_EntryHook@12");

sagamusix commented 5 years ago

there is no WM_NCLBUTTONDOWN or WM_SYSCOMMAND message when I click minimize or close buttons in windows title (I can see only WM_NCLBUTTONDOWN + HTCAPTION). So only Alt+F4 works for now.

WM_NCLBUTTONDOWN is the only thing you should be getting from the minimize and close buttons (because this is sent to figure out which WM_SYSCOMMAND would be triggered as a result, but I prevent it from generating the WM_SYSCOMMAND at all). WM_SYSCOMMAND should thus only come directly from the window's system menu (i.e. clicking on the window icon or right-clicking in the task bar).

Without testing, I believe that you might have set mail.tabs.drawInTitlebar to true, while I have set it to false. If that's the case you'll have to figure out how to make it work with that option enabled, maybe there is a way.

chumakovs commented 5 years ago

You are right about mail.tabs.drawInTitlebar - I was not careful with this.

I'm reviewing https://github.com/nmaier/mintrayr - seems there is an idea with WM_WINDOWPOSCHANGED.

chumakovs commented 5 years ago

I suspect there is no solution with mail.tabs.drawInTitlebar = true. I can see only WM_LBUTTONDOWN | WM_LBUTTONUP messages and nothing more.

sagamusix commented 5 years ago

I find it rather strange that Thunderbird wouldn't be sending the correct non-client area indicators to Windows since it draws native window controls even in that mode. Maybe you can try sending a WM_NCHITTEST message to the window with the appropriate coordinates to figure out if it really always just responds with HTCAPTION.

sagamusix commented 5 years ago

Also, in case you are not aware, you can use Spy++ from the Visual Studio tools to figure out which window messages are sent when hovering / clicking the NC buttons. This was a great helper for developing TBTray.

chumakovs commented 5 years ago

WM_NCHITTEST always returns HTCLIENT. Spy++ doesn't work until it's 64-bit TB. I need to install 32-bit one. But I need to take a pause for weekend.

froschl commented 4 years ago

is there anything new about a 64bit version ??

sagamusix commented 4 years ago

Where are you people all getting this 64-bit version from? I only see an official 32-bit download on thunderbird.net. As such, it's not a priority for me to provide a 64-bit version.

mmodler commented 4 years ago

https://www.thunderbird.net/de/

after the big download button click on "Systeme & Sprachen"

=>https://www.thunderbird.net/en-US/thunderbird/all/

froschl commented 4 years ago

Exactly, it's called "Systems and Languages" below the Button "Free Download"...

froschl commented 4 years ago

The Thunderbird guys could try to check the right version via the browser and offer the 64bit version automaticly if you run 64bit, but they go the easy way and offer 32bit to all at first... Maybe it's not necessary to use the 64bit version, but I got a lot of big mail folders and that's why I feel better. I run the 64bit Firefox too...

mmodler commented 4 years ago

Maybe it's not necessary to use the 64bit version, but I got a lot of big mail folders and that's why I feel better. I run the 64bit Firefox too...

Me too

sagamusix commented 4 years ago

Please try v0.10.2: https://github.com/sagamusix/TBTray/releases/tag/v0.10.2

mmodler commented 4 years ago

Works fine, thank you for your work!