D4koon / WhatsappTray

Minimize Whatsapp Desktop-Client to Tray
GNU General Public License v3.0
388 stars 31 forks source link

Feature Request: Mirror Taskbar Badge #16

Closed mshancock closed 5 years ago

mshancock commented 6 years ago

When WhatsApp is not minimized to tray and is not in focus, a red badge appears when there's an unread message on the taskbar icon. It would be great if the system tray icon mirrored this status so you know there's something to read.

D4koon commented 6 years ago

https://stackoverflow.com/questions/40260577/get-icon-process-from-hwnd-process-name-or-other-process-identifier

maximang commented 6 years ago

+1

mvbl commented 6 years ago

+1

nickluijtgaarden commented 6 years ago

+1

D4koon commented 6 years ago

It turns out that this is a lot harder than i thought because WhatsApp seems to use ITaskbarList3::SetOverlayIcon() to overlay the an icon that shows the number of unread messages and i could not find a way to read out the overlay-icon. https://stackoverflow.com/questions/50418729/get-the-icon-set-with-itaskbarlist3setoverlayicon Anyone has an idea how to do that?

arrmo commented 5 years ago

I'm interested in digging in to this a bit more - but I admit, first step is to get the dang debugger to be able to break on Callbacks. Is there a trick to getting that working? Yep, likely me just being an idiot ... :-).

Thanks!

D4koon commented 5 years ago

I'm interested in digging in to this a bit more - but I admit, first step is to get the dang debugger to be able to break on Callbacks. Is there a trick to getting that working? Yep, likely me just being an idiot ... :-).

Thanks!

Hi as far as i know there is no way to attach the debugger to the loaded dll in the whatsapp process to set breakpoints there. I used a combination of OutputDebugString and DebugView to debug this part.

Good luck :D

D4koon commented 5 years ago

Finaly it its time to release a testversion for this. Feedback would be nice. TestRelease.zip The icon is not the final one... just one i created fast to have one.

I just test-downloaded it and windows defender warned me about it. But i can asure you its a false positive...

nickluijtgaarden commented 5 years ago

Just downloaded it, will test it in the next few days.

D4koon commented 5 years ago

I now added a counter for messges that arrive when minimized. Probably the last test-release before final. TestReleaseV2.zip

Also pushed the changes into develop

kosmic0 commented 5 years ago

that is awesome for adding counter for messeges now the software is perfect thanx a alottt , question will this counter appear in the minimzed to tray icon? or minimized window ?

D4koon commented 5 years ago

question will this counter appear in the minimzed to tray icon? or minimized window ?

The counter will appear in the tray icon

D4koon commented 5 years ago

Will be in the release 1.4.0

arrmo commented 5 years ago

Sorry for the slow / late reply! Found I had some email filtering issues, wasn't getting Github notifications ... ;-(.

That aside - is this really showing count, or rather an exclamation mark? And I see the icon change sometimes when no messages have arrived ... anyone else seeing that?

Thanks!

D4koon commented 5 years ago

Yeah you are right it is not 100% correct. Im not sure if it is possible to differentiated between messages and whatever causes the false postives. I open a ticket for that #35.

kosmic0 commented 5 years ago

same here indicates new message recieved though i did not recieve any thanxxxxxxx

arrmo commented 5 years ago

Thanks, appreciate it! A couple thoughts added to #35.