From 73d8f2efb0823170442e7887271fde55cd14bad5 Mon Sep 17 00:00:00 2001 From: Vishal Rao Date: Thu, 16 Feb 2023 20:39:17 +0530 Subject: [PATCH] Keep launch animation for slower app startup --- src/Launcher.vala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Launcher.vala b/src/Launcher.vala index d3315d8a..b2dadb3b 100644 --- a/src/Launcher.vala +++ b/src/Launcher.vala @@ -40,17 +40,17 @@ public class Dock.Launcher : Gtk.Button { var context = Gdk.Display.get_default ().get_app_launch_context (); context.set_timestamp (Gdk.CURRENT_TIME); + context.launched.connect (() => { + Timeout.add (400, () => { + remove_css_class ("bounce"); + return Source.REMOVE; + }); + }); app_info.launch (null, context); } catch (Error e) { critical (e.message); } - Timeout.add (400, () => { - remove_css_class ("bounce"); - - return Source.REMOVE; - }); - }); } }