From 0f4e91c993e68306129f690996feee716a589838 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 25 Aug 2025 15:02:03 -0700 Subject: [PATCH] menu_launch_type: don't wait_still_screen for animated apps This is intended for things like system monitor where there's constant motion on the app screen so we can't wait_still_screen. Signed-off-by: Adam Williamson --- lib/utils.pm | 9 ++++++++- tests/applications/sysmon/aaa_setup.pm | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index 621ce30f..0e839c1a 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -1324,6 +1324,7 @@ sub menu_launch_type { my ($application, %args) = @_; my $desktop = get_var("DESKTOP"); my $timeout = $args{timeout} // 30; + my $animated = $args{animated} // 0; # The standard combo key is the "super" key, just in I3 # it is different. @@ -1360,7 +1361,13 @@ sub menu_launch_type { else { record_soft_failure('Maximizing in this desktop is not supported at the moment!'); } - wait_still_screen 3; + if $animated { + # can't wait_still_screen if the app's animated + sleep 3; + } + else { + wait_still_screen 3; + } } # If check that app is running was requested diff --git a/tests/applications/sysmon/aaa_setup.pm b/tests/applications/sysmon/aaa_setup.pm index 5176f989..877f7468 100644 --- a/tests/applications/sysmon/aaa_setup.pm +++ b/tests/applications/sysmon/aaa_setup.pm @@ -12,7 +12,7 @@ sub run { # Set the update notification timestamp set_update_notification_timestamp(); # Start the Application - menu_launch_type("system_monitor", checkstart => 1, maximize => 1); + menu_launch_type("system_monitor", checkstart => 1, maximize => 1, animated => 1); } sub test_flags {