From 763723895152fddef5797e83ca8b1513879c6bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20R=C5=AF=C5=BEi=C4=8Dka?= Date: Wed, 15 Jun 2022 09:50:51 +0200 Subject: [PATCH] Add some extra steps for KDE to overcome BZ2097208. --- lib/utils.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/utils.pm b/lib/utils.pm index 8eac7b1a..f9d70013 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -1196,10 +1196,18 @@ sub menu_launch_type { # launcher, typing the specified string and hitting enter. Pass # the string to be typed to launch whatever it is you want. my $app = shift; + # To overcome BZ2097208, let's move the mouse out of the way + # and give the launcher some time to take the correct focus. + if (get_var("DESKTOP") eq "kde") { + diag("Moving the mouse away from the launcher."); + mouse_set(1, 1); + } send_key 'super'; # srsly KDE y u so slo wait_still_screen 3; type_very_safely $app; + # Wait for KDE to place focus correctly. + sleep 2; send_key 'ret'; }