dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.22k stars 311 forks source link

Windows wallpaper #684

Closed Davido264 closed 1 year ago

Davido264 commented 1 year ago

Hi there, I was working with the pywal module to make a plugin for another app, and i found that (at least in my pc) SystemParametersInfoA doesn't work, but SystemParametersInfoW does. My pc es 64 bit architecture, and acording to the logic in pywal.wallpaper.set_win_wallpaper(), SystemParametersInfoA should work. I'm not confident enough to make a pull request deleting that if statement (although it is simple lol). I think I am doing something wrong or is an isolated case, so I mainly invite to research over this case

Gremious commented 1 year ago

The issue was not that you're supposed to use SystemParametersInfoW, it was that SystemParametersInfoA was passed the image path string in the wrong format :)

(In fact, as far as I saw, SystemParametersInfoA supposedly just re-encodes the string and calls SystemParametersInfoW?)

I have opened a PR which fixed the issue for me on Win 11: https://github.com/dylanaraps/pywal/pull/708