screenshot: Make captureScreenshot() return the GFile

Make the captureScreenshot() auxiliary function return the GFile at
which the texture was saved. This file will be used to return the
screenshot URI to the new D-Bus method to take interactive
screenshots.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>
This commit is contained in:
Georges Basile Stavracas Neto 2023-10-28 19:14:39 -03:00 committed by Marge Bot
parent f43a05bee6
commit 52a7ee7590

View File

@ -2279,6 +2279,8 @@ function _storeScreenshot(bytes, pixbuf) {
notification.setTransient(true);
Main.messageTray.add(source);
source.showNotification(notification);
return file;
}
/**
@ -2312,7 +2314,7 @@ export async function captureScreenshot(texture, geometry, scale, cursor) {
);
stream.close(null);
_storeScreenshot(stream.steal_as_bytes(), pixbuf);
return _storeScreenshot(stream.steal_as_bytes(), pixbuf);
}
/**