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',