From bbd21c9e5a5ad3dff78334bbf701d8b902e9f5ca Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 4 Aug 2026 01:34:30 +0000 Subject: [PATCH] Fix St.ImageContent.set_bytes missing Cogl.Context argument set_bytes() takes a Cogl.Context as its first parameter (added upstream in GNOME Shell 48, see js/ui/screenshot.js); omitting it produced "At least 6 arguments required, but only 5 passed" for every frame, which fell through to the equally non-functional Clutter.Image fallback and left the live wallpaper blank. --- lib/liveWallpaper.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/liveWallpaper.js b/lib/liveWallpaper.js index 9cafde0..342cf4d 100644 --- a/lib/liveWallpaper.js +++ b/lib/liveWallpaper.js @@ -15,13 +15,19 @@ import {loadGstreamerModules, GSTREAMER_INSTALL_HINT} from './gstreamerAvailabil * mechanism gnome-shell's own code uses for uploading raw pixel buffers — * is tried first, with the legacy Clutter.Image/set_data path kept only as * a fallback for older shells. + * + * St.ImageContent.set_bytes() takes a Cogl.Context as its first argument + * (see js/ui/screenshot.js upstream) — omitting it is what produced + * "At least 6 arguments required, but only 5 passed". */ const FRAME_IMAGE_STRATEGIES = [ { name: 'St.ImageContent', create: (width, height) => St.ImageContent.new_with_preferred_size(width, height), upload: (image, Cogl, data, width, height) => - image.set_bytes(GLib.Bytes.new(data), Cogl.PixelFormat.RGBA_8888, width, height, width * 4), + image.set_bytes( + global.stage.context.get_backend().get_cogl_context(), + GLib.Bytes.new(data), Cogl.PixelFormat.RGBA_8888, width, height, width * 4), }, { name: 'Clutter.Image',