socks-the-fox / Chameleon

Chameleon plugin for Rainmeter
Other
49 stars 0 forks source link

Inconsistent Chameleon color change when switching wallpaper #16

Open shifterest opened 2 years ago

shifterest commented 2 years ago

I use an automatic wallpaper changer (Reddit-Wallpaper) and I've been noticing a lot of inconsistencies with a skin I made (based off the example Socks skin) every time the wallpaper changes.

image

image

image

These are taken from consecutive wallpaper changes. Only way to fix it is by refreshing the skin that's one color late.

Edit: This is also reproducible with the Socks skins.

image

Edit 2: This is also reproducible by just manually changing the wallpaper.

eclectic-tech commented 2 years ago

This may be why it is not updating automatically: "Everything else will automatically update, as long as you've set DynamicVariables=1 on the appropriate meters."

socks-the-fox commented 2 years ago

A good suggestion, but the example Socks skin already has that and is demonstrating the same issue. I have no idea what could be the cause...

Are the "behind" skins consistently one update behind? For example, if you change the desktop 3 times, do the behind ones use the colors from "x,1,1", "1,1,1", "x,1,2", or "1,1,2" (assuming expected behavior is "1,2,3"). And is it always the same skins that are behind?

shifterest commented 2 years ago

Seems like it. The skin with the highest load order (I have 3 skins active) is the only skin that lags behind color updates.

Edit: Seems like this happens consistently with high-res wallpapers (most of my wallpapers are 2160p and up). Tried switching between 1080p wallpapers, and though colors are still bugged sometimes, it's not as consistent.

socks-the-fox commented 2 years ago

Strange. I have a few very high res wallpapers myself but I'm just using the default Windows slideshow thing so I'm wondering if it has something to do with how that program is doing the wallpaper changing, but I don't see anything super obvious. It could be a race condition thing, and a different update rate might change how things pan out...

Just a quick explanation of how Chameleon does it's updates:

What I'm thinking is that maybe the program you're using is doing something that causes Windows to update the API result but not the actual desktop for a few milliseconds, then Rainmeter is running the skin updates from highest-to-lowest so the one or two get the old wallpaper while the new one is still saving; then since it takes time for Chameleon to go over the image, by the time the later skins get updated they get the new correct values. Then those skins don't have their colors updated because Chameleon doesn't realize it's behind.

shifterest commented 2 years ago

I don't think it's the program I'm using, since I changed the wallpaper manually for my other recent tests (including the one below) and the same issue is still there.

image

Socks does have Update = 25, which is probably a bit too fast for my liking to put on my own skins, but Socks suffers from the same issue regardless.

I've thought of a workaround for my use case: if the string for the path to the wallpaper image changes for one of the skins, I'll just refresh the whole skin group. Weirdly enough that string changes for every skin, independent of the color hex string.

Maybe it's just an issue unique to my system? I run Windows 11, if that matters.

socks-the-fox commented 2 years ago

Ah, I don't have Windows 11 yet. I've been considering an update but have been putting it off until more of the "papercuts" get fixed. I wonder if Windows 11 changed how grabbing the desktop "window" contents works...

Yeah the rapid update rate is mostly because I haven't found a way to be notified via API when the desktop changes so Chameleon has to manually check every time Rainmeter sends a skin update/refresh. I wonder if the opposite, having a slower update rate, would help? It'd be a mediocre workaround that wouldn't work 100% of the time if at all though. If it does, that would narrow down the issue to something timing related.

shifterest commented 2 years ago

Tried a slower update rate, still the same thing unfortunately.

e-t-l commented 10 months ago

Ah, I don't have Windows 11 yet. I've been considering an update but have been putting it off until more of the "papercuts" get fixed. I wonder if Windows 11 changed how grabbing the desktop "window" contents works...

FYI I've run Rainmeter with Chameleon on a Win 11 machine and it worked just fine, so I doubt it's this