| |
@@ -4,6 +4,7 @@
|
| |
|
| |
use base 'Exporter';
|
| |
use Exporter;
|
| |
+ use i3;
|
| |
|
| |
use lockapi;
|
| |
use testapi qw(is_serial_terminal :DEFAULT);
|
| |
@@ -813,12 +814,23 @@
|
| |
sub handle_welcome_screen {
|
| |
# handle the 'welcome' screen on GNOME and KDE since F38. shared
|
| |
# in a few places
|
| |
- if (check_screen "getting_started", 45) {
|
| |
+ my %args = @_;
|
| |
+ my $timeout = $args{timeout} || 45;
|
| |
+ if (check_screen "getting_started", $timeout) {
|
| |
if (get_var("DESKTOP") eq "kde") {
|
| |
# just closing it seems to result in it running again on
|
| |
# next boot, so let's click Skip
|
| |
click_lastmatch;
|
| |
}
|
| |
+ elsif (get_var("DESKTOP") eq "i3") {
|
| |
+ # Press enter to start config, then move one line down
|
| |
+ # and press enter once more to confirm.
|
| |
+ send_key("ret");
|
| |
+ sleep(1);
|
| |
+ send_key("down");
|
| |
+ sleep(1);
|
| |
+ send_key("ret");
|
| |
+ }
|
| |
else {
|
| |
send_key "alt-f4";
|
| |
# for GNOME 40, alt-f4 doesn't work
|
| |
@@ -1108,6 +1120,7 @@
|
| |
last;
|
| |
}
|
| |
}
|
| |
+
|
| |
if ($activematched) {
|
| |
# make sure we got to inactive after active
|
| |
die "never reached apps_menu_button_inactive!" unless (match_has_tag "apps_menu_button_inactive");
|
| |
@@ -1372,18 +1385,23 @@
|
| |
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);
|
| |
+ 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'; };
|
| |
+ # srsly KDE y u so slo
|
| |
+ wait_still_screen 3;
|
| |
+ type_very_safely $app;
|
| |
+ # Wait for KDE to place focus correctly.
|
| |
+ wait_still_screen 2;
|
| |
+ send_key 'ret';
|
| |
+ wait_still_screen 3;
|
| |
}
|
| |
- wait_screen_change { send_key 'super'; };
|
| |
- # srsly KDE y u so slo
|
| |
- wait_still_screen 3;
|
| |
- type_very_safely $app;
|
| |
- # Wait for KDE to place focus correctly.
|
| |
- wait_still_screen 2;
|
| |
- send_key 'ret';
|
| |
- wait_still_screen 3;
|
| |
}
|
| |
|
| |
sub tell_source {
|
| |
@@ -1639,7 +1657,7 @@
|
| |
}
|
| |
elsif ($desktop eq "gnome") {
|
| |
# Start the terminal to set up backgrounds.
|
| |
- menu_launch_type "terminal";
|
| |
+ menu_launch_type("terminal");
|
| |
# wait to be sure it's fully open
|
| |
wait_still_screen(stilltime => 5, similarity_level => 38);
|
| |
# When the application opens, run command in it to set the background to black
|
| |