BigE / desk-changer

Gnome-Shell wallpaper changing extension with multiple profile support
MIT License
79 stars 13 forks source link

GNOME 42 compatibility #88

Closed gnu1dea closed 2 years ago

gnu1dea commented 2 years ago

Please update Desk Changer to be compatible with GNOME 42

Peter-Flynn commented 2 years ago

In the meantime, you can add "42" to the shell-version list in "metadata.json", and compile yourself. Seems to work just fine without further changes.

nickurak commented 2 years ago

While it runs, it's not actually setting the backgrounds at all since I upgraded to Gnome 42 (via Fedora 36 beta). bug

nickurak commented 2 years ago

It looks to me like the extension is updating picture-uri, but since I have gnome 42's new dark-mode enabled, it needs to be updating picture-uri-dark instead.

This diff does seem to make it functional here, though I haven't looked to see if that maintains backwards compatability or has any other unexpected effects:

diff -u -ru desk-changer@eric.gach.gmail.com.old/daemon/server.js desk-changer@eric.gach.gmail.com/daemon/server.js
--- desk-changer@eric.gach.gmail.com.old/daemon/server.js       2022-04-17 18:53:00.739803588 -0600
+++ desk-changer@eric.gach.gmail.com/daemon/server.js   2022-04-17 18:51:44.840303853 -0600
@@ -352,6 +352,7 @@
     _set_wallpaper(uri) {
         deskchanger.debug(`setting wallpaper to ${uri}`);
         this._background.set_string('picture-uri', uri);
+        this._background.set_string('picture-uri-dark', uri);
         this.emit_signal('Changed', new GLib.Variant('(s)', [uri]));
     }
 }
BigE commented 2 years ago

It looks to me like the extension is updating picture-uri, but since I have gnome 42's new dark-mode enabled, it needs to be updating picture-uri-dark instead.

Thanks for finding this! I have not looked into Gnome 42 and the changes there... it'll be interesting to see how the new setting is used with dark mode. An initial change would be to set both, like the patch here shows, but I'll also be looking into making this a more permanent feature of the extension as well.

BigE commented 2 years ago

Gnome 42 compatibility has been added to version-34. This will be pushed to the gnome-shell extension website ASAP. Thanks for the reports and help tracking this down!