From c0dd8de64665f5ebc316ce915e5c61f84b3daa04 Mon Sep 17 00:00:00 2001 From: Leonhard <106322251+leolost2605@users.noreply.github.com> Date: Tue, 13 Aug 2024 01:03:49 +0200 Subject: [PATCH] Screenshot: Fix the interactive dialog being visible in screenshots of the entire screen (#109) --- src/Screenshot/Portal.vala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Screenshot/Portal.vala b/src/Screenshot/Portal.vala index b1cd9416..f70314e4 100644 --- a/src/Screenshot/Portal.vala +++ b/src/Screenshot/Portal.vala @@ -170,14 +170,16 @@ public class Screenshot.Portal : Object { cancelled = false; } - screenshot.callback (); + dialog.destroy (); + + // When we close our window, gala fades us out so wait until we are actually not visible anymore + // (The animation duration in gala is currently 195ms) + Timeout.add_once (200, () => screenshot.callback ()); }); dialog.show (); yield; - dialog.destroy (); - if (cancelled) { response = 1; return;