mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-21 13:33:08 +00:00
Fix menu_launch_type for i3
Without this, all we did on i3 was hit alt-d and...do nothing, we didn't type the app name. I was confused at how we didn't notice this before, but it looks like at present menu_launch_type isn't actually used in any test we run on i3 (a lot of tests that use it to run a terminal got a branch for i3 which uses alt-enter instead). This is an obvious landmine, though, and it caused things to look weird when rebasing #323 (which is how I noticed the bug). This also refactors the sub to use the same logic for all desktops, just with a different key for i3, since they really all work the same. i3 doesn't need as much waiting as the other desktops, probably, but it doesn't really hurt and keeps the code simple. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
ec34439004
commit
b7487e97e9
11
lib/utils.pm
11
lib/utils.pm
@ -1381,17 +1381,15 @@ 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;
|
||||
my $key = 'super';
|
||||
$key = 'alt-d' if (get_var("DESKTOP") eq "i3");
|
||||
if (get_var("DESKTOP") eq "kde") {
|
||||
# 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 "i3") {
|
||||
send_key("alt-d");
|
||||
}
|
||||
else {
|
||||
if (get_var("DESKTOP") eq "kde") {
|
||||
diag("Moving the mouse away from the launcher.");
|
||||
mouse_set(1, 1);
|
||||
}
|
||||
wait_screen_change { send_key 'super'; };
|
||||
wait_screen_change { send_key $key; };
|
||||
# srsly KDE y u so slo
|
||||
wait_still_screen 3;
|
||||
type_very_safely $app;
|
||||
@ -1399,7 +1397,6 @@ sub menu_launch_type {
|
||||
wait_still_screen 2;
|
||||
send_key 'ret';
|
||||
wait_still_screen 3;
|
||||
}
|
||||
}
|
||||
|
||||
sub tell_source {
|
||||
|
Loading…
Reference in New Issue
Block a user