paperwm / PaperWM

Tiled scrollable window management for Gnome Shell
GNU General Public License v3.0
2.75k stars 122 forks source link

Dynamic Wallpapers doesn't works with PaperWM #637

Closed iitzrohan closed 7 months ago

iitzrohan commented 8 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Install Any Dynamic Wallpaper.
  2. Set the wallpaper in gnome-settings
  3. Activate PaperWM
  4. The background becomes flat color.

Expected behavior The background should be same as when the extension was disabled.

Screenshots Screenshot from 2023-10-18 00-41-37 image image

System information: Distribution: Fedora Linux GNOME Shell 45.0 Display server: Wayland PaperWM branch/tag: release PaperWM commit: 7919f129bb8027e86ad8f54db682c57340bf5fd0 Enabled extensions:

Additional context It works as expected when using the normal backgrounds.

jtaala commented 8 months ago

Thanks for the report - can you let me know what you're using for dynamic wallpapers? (e.g. the program or extension) so we can try reproduce.

P.S. I may be misunderstanding what you mean by dynamic wallpapers.

iitzrohan commented 8 months ago

Thanks for the report - can you let me know what you're using for dynamic wallpapers? (e.g. the program or extension) so we can try reproduce.

P.S. I may be misunderstanding what you mean by dynamic wallpapers.

Yeah, Here's the repo i downloaded the wallpaper from https://github.com/manishprivet/dynamic-gnome-wallpapers

For quick installation i ran the following command. curl -s https://wallpapers.manishk.dev/install.sh | sudo bash -s Fuji --global

Also, Fedora comes with 1-2 dynamic wallpapers by default. You can try using that too.

jtaala commented 8 months ago

Hmm - I tried all the fedora 38 ones but couldn't reproduce (although they look like wallpaper that just changes based on the theme).

Will try those you linked.

iitzrohan commented 8 months ago

Hmm - I tried all the fedora 38 ones but couldn't reproduce (although they look like wallpaper that just changes based on the theme).

Will try those you linked.

It's not based on theme. It changes with time. You probably tried the light/dark theme variant. The Dynamic ones have the timer icon at their bottom left while in gnome settings.

jtaala commented 8 months ago

I see it. Can also reproduce!

Will have a look at this one in the next few days. Thanks for reporting.

Thesola10 commented 7 months ago

That would be because the wallpaper shown by PaperWM is fake. I figured that out when implementing the night mode wallpaper switch, PaperWM has to draw the wallpaper itself to hide the "real" windows, so to support dynamic wallpapers, we'd need to somehow duplicate or change the position of GNOME's official wallpaper Actor.

bbhtt commented 7 months ago

This is https://github.com/paperwm/PaperWM/issues/365, the title on that issue makes it hard to find. "live" or timed wallpapers is the issue - ones that change based on time of the day or animated.

iitzrohan commented 7 months ago

One way to fix this is to make the background layer fully transparent instead of setting it's own wallpaper.

Thesola10 commented 7 months ago

One way to fix this is to make the background layer fully transparent instead of setting it's own wallpaper.

Unfortunately out of the question, as the background layer PaperWM draws is required to hide windows that are supposed to be off-screen, as Mutter doesn't allow windows to be this far off screen.

jtaala commented 7 months ago

Yes, the way to implement this correctly is to add support for this based off Gnome's Background class implementation of Meta.Background - we use the base class (Meta.Background).

Sadly, Gnome hasn't exported (exposed to extensions) their class implementation so we'll need to add our own concrete implementation (which does the same thing) in PaperWM.

jtaala commented 7 months ago

I hopefully should get a bit of time in the next few evenings to give this a go. Otherwise will tackle this in the weekend.

jtaala commented 7 months ago

Got this working on a gnome-44 branch (basically because I can access Background.Background class as I don't have to duplicate code due to gnome-45 not exporting that class).

You can test it out if you want (although it's for gnome-44, I'll port changes to gnome-45 branch shortly, but will be a bit more involved given will need to duplicate code as can't access it directly).

https://github.com/paperwm/PaperWM/tree/fix-637-animated-wallpaper (gnome 44 version)

jtaala commented 7 months ago

Okay, here's a gnome-45 version of this implementation. You'll note that I had to copy large portions of background.js from Gnome-shell since the main Background class wasn't exported.

Call for testing! Please checkout and test this:

git clone https://github.com/paperwm/PaperWM.git
cd PaperWM
git checkout fix-637-animated-wallpaper-gnome45
./install.sh

Then logout / login and try out any dynamic/animated wallpapers.

Thanks!

jtaala commented 7 months ago

I'm digging some of these dynamic wallpapers. Thanks for reporting this @iitzrohan.

iitzrohan commented 7 months ago

It's working on "fix-637-animated-wallpaper-gnome45" Branch. Thanks @jtaala for fixing.This extension is a godsend for productivity.May i close this issue now?

jtaala commented 7 months ago

Leave it open - It'll get closed when I merge it into develop and release.

jtaala commented 7 months ago

Found some cool dynamic wallpapers here: https://github.com/saint-13/Linux_Dynamic_Wallpapers/

iitzrohan commented 7 months ago

Thank you for sharing. I thought there were only a few dynamic wallpapers available.