2011-02-01 18:18:25 +01:00
|
|
|
#!perl
|
|
|
|
# vim:ts=4:sw=4:expandtab
|
|
|
|
#
|
|
|
|
# Regression test for correct focus behaviour when moving a floating con to
|
|
|
|
# another workspace.
|
|
|
|
#
|
|
|
|
use X11::XCB qw(:all);
|
2011-03-09 20:25:17 +01:00
|
|
|
use i3test;
|
2011-02-01 18:18:25 +01:00
|
|
|
|
|
|
|
BEGIN {
|
|
|
|
use_ok('X11::XCB::Window');
|
|
|
|
}
|
|
|
|
|
|
|
|
my $x = X11::XCB::Connection->new;
|
|
|
|
|
2011-03-09 20:25:17 +01:00
|
|
|
my $tmp = fresh_workspace;
|
2011-02-01 18:18:25 +01:00
|
|
|
|
|
|
|
# open a tiling window on the first workspace
|
|
|
|
open_standard_window($x);
|
2011-09-23 21:37:45 +02:00
|
|
|
#sleep 0.25;
|
2011-02-01 18:18:25 +01:00
|
|
|
my $first = get_focused($tmp);
|
|
|
|
|
|
|
|
# on a different ws, open a floating window
|
2011-03-09 20:25:17 +01:00
|
|
|
my $otmp = fresh_workspace;
|
2011-02-01 18:18:25 +01:00
|
|
|
open_standard_window($x);
|
2011-09-23 21:37:45 +02:00
|
|
|
#sleep 0.25;
|
2011-02-01 18:18:25 +01:00
|
|
|
my $float = get_focused($otmp);
|
|
|
|
cmd 'mode toggle';
|
2011-09-23 21:37:45 +02:00
|
|
|
#sleep 0.25;
|
2011-02-01 18:18:25 +01:00
|
|
|
|
|
|
|
# move the floating con to first workspace
|
|
|
|
cmd "move workspace $tmp";
|
2011-09-23 21:37:45 +02:00
|
|
|
#sleep 0.25;
|
2011-02-01 18:18:25 +01:00
|
|
|
|
|
|
|
# switch to the first ws and check focus
|
|
|
|
is(get_focused($tmp), $float, 'floating client correctly focused');
|
2011-03-09 20:25:17 +01:00
|
|
|
|
|
|
|
done_testing;
|