screenshot: Close screenshot UI if we failed to acquire a grab

Otherwise the actors will remain invisible yet reactive covering up the
screen.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5414
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2287>
This commit is contained in:
Sebastian Keller 2022-04-30 08:24:14 +02:00 committed by Marge Bot
parent 9303a56415
commit 3e8164cc36

View File

@ -1510,8 +1510,10 @@ var ScreenshotUI = GObject.registerClass({
actor: this,
onUngrab: () => this.close(),
});
if (!grabResult)
if (!grabResult) {
this.close(true);
return;
}
this._refreshButtonLayout();