Elestriel / TaskbarTools

Grants the ability to set the Windows Taskbar to any opacity and colour desired.
MIT License
343 stars 29 forks source link

Flicker when clicking the start menu #4

Open krestaino opened 7 years ago

krestaino commented 7 years ago

The taskbar is flickering for me when I click on things, particularly the start menu.

Here's an example: https://gfycat.com/FluffyWetBanteng

Elestriel commented 7 years ago

When you click on the Start Button, Windows automatically re-applies the "right" style to the Taskbar. I'm going to try to find a way to interrupt that so there's no flickering, but for now, that's an unfortunate side-effect.

sylveon commented 7 years ago

It would require a hook, something not doable in C#, only C++

Elestriel commented 7 years ago

You would be amazed at some of the hooks I've written in C#. ;)

sylveon commented 7 years ago

Depends on the type. A hook for keyboard can be, but a hook for messages, as required in this situation, requires a native DLL library to inject (so it can't be written in C# because the resulting DLL would be managed)

olliecheng commented 7 years ago

Yup. That hook would need to receive the WM_PAINT message.

ethanhs commented 7 years ago

Let me add that writing such a hook is not for the faint of heart. Both myself and @charlesmilette tried and I at least have given up for now. If you do go down this path, you will want to use SetWindowHookEx. Subclassing won't work as you don't own the Window.

ethanhs commented 7 years ago

FWIW, in my C++ version I was able to lower the sleep to 5ms without serious repercussions, which gets rid of all flickering I have seen.