Suspend rotation while a live wallpaper is on screen
The extension's own log showed rotation kept firing ("Wallpaper
changed to ...") after live wallpaper playback had already started.
Each rotation change writes org.gnome.desktop.background's
picture-uri, which makes GNOME Shell repaint its own background actor
into the same _backgroundGroup our live wallpaper actor lives in,
landing on top of it and hiding the video/GIF entirely.
LiveWallpaperManager now takes an onActiveChanged callback, invoked
only on actual start/stop transitions, which extension.js uses to
suspend/unsuspend RotationManager. This is tracked separately from
user-initiated pause()/resume() so turning live wallpaper off restores
whatever rotation state the user actually had, and next()/previous()
now no-op while suspended so manual/forced-OLED wallpaper changes
can't sneak one in either. The indicator's "Next Wallpaper" item is
greyed out to match.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RDqbdjsiisSU7CbQke4g8
This commit is contained in:
+13
-1
@@ -14,7 +14,19 @@ export default class BenthicBloomExtension extends Extension {
|
||||
this._logger = new Logger(this._settings, this.metadata.name);
|
||||
|
||||
this._rotationManager = new RotationManager(this._settings, this._logger);
|
||||
this._liveWallpaperManager = new LiveWallpaperManager(this._settings, this._logger);
|
||||
this._liveWallpaperManager = new LiveWallpaperManager(this._settings, this._logger, {
|
||||
// Rotation changes the static picture-uri GSettings key, which
|
||||
// makes the shell repaint its own background actor on top of
|
||||
// the live wallpaper's. Suspend rotation while a live
|
||||
// wallpaper is actually on screen, independent of any
|
||||
// user-initiated pause.
|
||||
onActiveChanged: active => {
|
||||
if (active)
|
||||
this._rotationManager.suspend();
|
||||
else
|
||||
this._rotationManager.unsuspend();
|
||||
},
|
||||
});
|
||||
this._oledProtectionManager = new OledProtectionManager(this._settings, this._logger, {
|
||||
forceNextWallpaper: maxSeconds => {
|
||||
if (this._rotationManager.secondsSinceLastChange >= maxSeconds) {
|
||||
|
||||
Reference in New Issue
Block a user