Fix false-positive "GStreamer Not Found" warning in Preferences

The Preferences window's availability probe (added to surface missing
GStreamer deps in-UI) reused loadGstreamerModules(), which also checks
for Cogl. Cogl is Mutter's private library — its typelib is only
reachable from inside the actual gnome-shell process (which gets a
private GI search path), never from the separate, plain-GTK4
Preferences process. So the check always failed there with "Requiring
Cogl ... not found" even when live wallpapers were working correctly
in the real shell process, as confirmed by a user report where the
extension's own log showed live wallpaper playback starting cleanly
while Preferences simultaneously claimed GStreamer was missing.

Split into loadGstreamerModules() (Gst+GstApp+Cogl, used only by
liveWallpaper.js in the shell process) and a new lighter
checkGstreamerBaseAvailable() (Gst+GstApp only) for prefs.js, with a
note in the UI that a clean check there isn't a full guarantee since
the private half can't be verified from that process.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RDqbdjsiisSU7CbQke4g8
This commit is contained in:
Claude
2026-08-04 00:36:48 +00:00
parent d180c90434
commit f7c05c2c76
2 changed files with 31 additions and 10 deletions
+5 -3
View File
@@ -6,12 +6,12 @@ import Gdk from 'gi://Gdk';
import {ExtensionPreferences, gettext as _} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
import {SettingsKey} from './lib/settingsKeys.js';
import {loadGstreamerModules, GSTREAMER_INSTALL_HINT} from './lib/gstreamerAvailability.js';
import {checkGstreamerBaseAvailable, GSTREAMER_INSTALL_HINT} from './lib/gstreamerAvailability.js';
export default class BenthicBloomPreferences extends ExtensionPreferences {
async fillPreferencesWindow(window) {
const settings = this.getSettings();
const gstreamerError = await loadGstreamerModules().then(() => null, e => e.message ?? String(e));
const gstreamerError = await checkGstreamerBaseAvailable().then(() => null, e => e.message ?? String(e));
window.set_default_size(640, 720);
window.add(this._buildGeneralPage(settings));
@@ -192,7 +192,9 @@ export default class BenthicBloomPreferences extends ExtensionPreferences {
description: _(
'Play a looping video or animated GIF as your desktop background instead of a static image. ' +
'Requires GStreamer (with its "good" and "base" plugin sets, which provide GIF decoding) ' +
'to be installed on your system.'),
'to be installed on your system. Note: this page can only detect GStreamer being ' +
'completely missing — the rendering path it also needs is private to gnome-shell and can’t ' +
'be checked from here, so the absence of a warning below isn’t a full guarantee.'),
});
page.add(group);
group.add(this._switchRow(