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:
parent
f43a05bee6
commit
52a7ee7590
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user