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.
This commit is contained in:
Claude
2026-08-04 01:34:30 +00:00
parent 2365d303f3
commit bbd21c9e5a
+7 -1
View File
@@ -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',