Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Taskbar minimize/restore on scroll] Thumbnail flickering #1426

Open
Deykii opened this issue Jan 13, 2025 · 15 comments
Open

[Taskbar minimize/restore on scroll] Thumbnail flickering #1426

Deykii opened this issue Jan 13, 2025 · 15 comments
Labels
info-needed Further information is requested mod-bug Something isn't working with a mod

Comments

@Deykii
Copy link

Deykii commented Jan 13, 2025

@m417z
When the mod is enabled, the thumbnails of tasks start flickering. Idk what to do with this, when I disable mod everything is fine

@Deykii Deykii added the mod-bug Something isn't working with a mod label Jan 13, 2025
@m417z
Copy link
Member

m417z commented Jan 13, 2025

Can you please post logs and a video recording?

Please attach debug logs by following the instructions on the Troubleshooting page:
https://github.com/ramensoftware/windhawk/wiki/Troubleshooting#some-or-all-windhawk-mods-dont-work

  • Disable the mod.
  • Go to the mod's Advanced tab.
  • Set Debug logging to Detailed debug logs.
  • Click on Show log output.
  • Enable the mod.
  • Verify that the mod doesn't work, copy the log and save it to a file.
  • Set Debug logging back to None.

In the "Verify that the mod doesn't work" step, trigger the flickering so that the relevant events will be logged.

@Deykii
Copy link
Author

Deykii commented Jan 13, 2025

Can you please post logs and a video recording?

Please attach debug logs by following the instructions on the Troubleshooting page: https://github.com/ramensoftware/windhawk/wiki/Troubleshooting#some-or-all-windhawk-mods-dont-work

  • Disable the mod.
  • Go to the mod's Advanced tab.
  • Set Debug logging to Detailed debug logs.
  • Click on Show log output.
  • Enable the mod.
  • Verify that the mod doesn't work, copy the log and save it to a file.
  • Set Debug logging back to None.

In the "Verify that the mod doesn't work" step, trigger the flickering so that the relevant events will be logged.

For some reason it is not visible on screen recording(at least I don't see it), so I recorded it on phone's camera.
Here's the log: https://ctxt.io/2/AAB4OUk4Ew
Here's the video(from phone): https://streamable.com/zj3bd6

@m417z
Copy link
Member

m417z commented Jan 13, 2025

I believe that I found the root cause of the problem. Can you please try the following version:
https://github.com/m417z/my-windhawk-mods/blob/8a4f8969665fc3660c0d0ad06b862f073e88cc1f/mods/taskbar-button-scroll.wh.cpp

To try it, disable the existing mod, then click the bottom right button to create a new mod, replace the code with the test mod code, click "Compile Mod", then "Exit Editing Mode".

@Deykii
Copy link
Author

Deykii commented Jan 14, 2025

I believe that I found the root cause of the problem. Can you please try the following version: https://github.com/m417z/my-windhawk-mods/blob/8a4f8969665fc3660c0d0ad06b862f073e88cc1f/mods/taskbar-button-scroll.wh.cpp

To try it, disable the existing mod, then click the bottom right button to create a new mod, replace the code with the test mod code, click "Compile Mod", then "Exit Editing Mode".

I just forked it, now everything works fine! Thank you!!! But, is this normal? xD I didn't notice it actually
image
image

@m417z
Copy link
Member

m417z commented Jan 14, 2025

That's related to the problem of flickering. For fixing #661, I added code that refreshes the thumbnail after scrolling, but the bug was that it was refreshing it non-stop. Now it's refreshed once, 200 ms after the scroll. Perhaps this delay is not long enough. Can you edit the mod and change the following line:

SetTimer(hWnd, kRefreshTaskbarTimer, 200, 0);

For example, replace 200 with 1000. Does it help?

@Deykii
Copy link
Author

Deykii commented Jan 14, 2025

That's related to the problem of flickering. For fixing #661, I added code that refreshes the thumbnail after scrolling, but the bug was that it was refreshing it non-stop. Now it's refreshed once, 200 ms after the scroll. Perhaps this delay is not long enough. Can you edit the mod and change the following line:

SetTimer(hWnd, kRefreshTaskbarTimer, 200, 0);

For example, replace 200 with 1000. Does it help?

Nope

@m417z
Copy link
Member

m417z commented Jan 14, 2025

Did you have the problem with the original 1.0.7 version, before this fix? Can you post a recording showing it? I can't reproduce it.

@Deykii
Copy link
Author

Deykii commented Jan 14, 2025

Did you have the problem with the original 1.0.7 version, before this fix? Can you post a recording showing it? I can't reproduce it.

I reinstalled the mod, yeah, I had this problem

Recording.2025-01-14.184235.mp4

@m417z
Copy link
Member

m417z commented Jan 14, 2025

Ah, OK, the workaround I implemented only works when scrolling over the thumbnail preview. I didn't find an easy workaround for scrolling over taskbar items. Note that it's a Windows bug, and can also be reproduced without the mod if you're quick enough.

@Deykii
Copy link
Author

Deykii commented Jan 14, 2025

Ah, OK, the workaround I implemented only works when scrolling over the thumbnail preview. I didn't find an easy workaround for scrolling over taskbar items. Note that it's a Windows bug, and can also be reproduced without the mod if you're quick enough.

Okay, thanks!!!

@Deykii Deykii closed this as completed Jan 14, 2025
@Deykii
Copy link
Author

Deykii commented Jan 27, 2025

It started flickering again 😭

@Deykii Deykii reopened this Jan 27, 2025
@m417z
Copy link
Member

m417z commented Jan 27, 2025

Did you change anything? Does it flicker constantly like it did previously? Only when the mod (with the fix) is enabled?
I have no explanation for that, but if the answer to the above is true, I can try posting a mod version with more logs or reduced functionality to try and understand what causes it.

@m417z m417z added the info-needed Further information is requested label Jan 27, 2025
@Deykii
Copy link
Author

Deykii commented Jan 28, 2025

Did you change anything? Does it flicker constantly like it did previously? Only when the mod (with the fix) is enabled? I have no explanation for that, but if the answer to the above is true, I can try posting a mod version with more logs or reduced functionality to try and understand what causes it.

I didn't change anything. It's flickering as it was previously. Only when forked mod is enabled.

@m417z
Copy link
Member

m417z commented Jan 29, 2025

Did you, by any chance, enable the mod without the fix? Enabling it may cause the issue, even after the mod is disabled, until explorer.exe is restarted.

If that's not the case, try the following: disable the current "Taskbar minimize/restore on scroll" mod, restart Windows Explorer in Task Manager, then install this mod using the same steps from my previous comment here, and let me know if you still see the issue:
https://github.com/m417z/my-windhawk-mods/blob/f68e89e8b203ea1ff52acf15f75e82a3611105e1/mods/taskbar-button-scroll.wh.cpp

@Deykii
Copy link
Author

Deykii commented Jan 30, 2025

Did you, by any chance, enable the mod without the fix? Enabling it may cause the issue, even after the mod is disabled, until explorer.exe is restarted.

If that's not the case, try the following: disable the current "Taskbar minimize/restore on scroll" mod, restart Windows Explorer in Task Manager, then install this mod using the same steps from my previous comment here, and let me know if you still see the issue: https://github.com/m417z/my-windhawk-mods/blob/f68e89e8b203ea1ff52acf15f75e82a3611105e1/mods/taskbar-button-scroll.wh.cpp

I reinstalled the fork and it tarted work normally :0
I guess I'll do this regularly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Further information is requested mod-bug Something isn't working with a mod
Projects
None yet
Development

No branches or pull requests

2 participants