screenshot: Fix notification
St.ImageContent.set_bytes() now has an additional Cogl.Context parameter. Fixes: 44b84e458a ("st/image-content: Take a CoglContext on set_bytes/set_data functions") Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8190 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3631>
This commit is contained in:
parent
3726161bfd
commit
4f5cd433b2
@ -2308,10 +2308,12 @@ function _storeScreenshot(bytes, pixbuf) {
|
||||
// Create a St.ImageContent icon for the notification. We want
|
||||
// St.ImageContent specifically because it preserves the aspect ratio when
|
||||
// shown in a notification.
|
||||
const coglContext = global.stage.context.get_backend().get_cogl_context();
|
||||
const pixels = pixbuf.read_pixel_bytes();
|
||||
const content =
|
||||
St.ImageContent.new_with_preferred_size(pixbuf.width, pixbuf.height);
|
||||
content.set_bytes(
|
||||
coglContext,
|
||||
pixels,
|
||||
Cogl.PixelFormat.RGBA_8888,
|
||||
pixbuf.width,
|
||||
|
Loading…
x
Reference in New Issue
Block a user