2011-02-01 12:18:25 -05:00
|
|
|
#!perl
|
|
|
|
# vim:ts=4:sw=4:expandtab
|
|
|
|
#
|
2012-09-10 08:09:01 -04:00
|
|
|
# Please read the following documents before working on tests:
|
|
|
|
# • http://build.i3wm.org/docs/testsuite.html
|
|
|
|
# (or docs/testsuite)
|
|
|
|
#
|
|
|
|
# • http://build.i3wm.org/docs/lib-i3test.html
|
|
|
|
# (alternatively: perldoc ./testcases/lib/i3test.pm)
|
|
|
|
#
|
|
|
|
# • http://build.i3wm.org/docs/ipc.html
|
|
|
|
# (or docs/ipc)
|
|
|
|
#
|
|
|
|
# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
|
|
|
|
# (unless you are already familiar with Perl)
|
|
|
|
#
|
2011-02-01 12:18:25 -05:00
|
|
|
# Regression test for correct focus behaviour when moving a floating con to
|
|
|
|
# another workspace.
|
|
|
|
#
|
2011-03-09 14:25:17 -05:00
|
|
|
use i3test;
|
2011-02-01 12:18:25 -05:00
|
|
|
|
2011-03-09 14:25:17 -05:00
|
|
|
my $tmp = fresh_workspace;
|
2011-02-01 12:18:25 -05:00
|
|
|
|
|
|
|
# open a tiling window on the first workspace
|
2011-11-21 18:47:32 -05:00
|
|
|
open_window;
|
2011-02-01 12:18:25 -05:00
|
|
|
my $first = get_focused($tmp);
|
|
|
|
|
|
|
|
# on a different ws, open a floating window
|
2011-03-09 14:25:17 -05:00
|
|
|
my $otmp = fresh_workspace;
|
2011-11-21 18:47:32 -05:00
|
|
|
open_window;
|
2011-02-01 12:18:25 -05:00
|
|
|
my $float = get_focused($otmp);
|
|
|
|
cmd 'mode toggle';
|
2011-11-23 06:57:13 -05:00
|
|
|
sync_with_i3;
|
2011-02-01 12:18:25 -05:00
|
|
|
|
|
|
|
# move the floating con to first workspace
|
|
|
|
cmd "move workspace $tmp";
|
2011-11-23 06:57:13 -05:00
|
|
|
sync_with_i3;
|
2011-02-01 12:18:25 -05:00
|
|
|
|
|
|
|
# switch to the first ws and check focus
|
|
|
|
is(get_focused($tmp), $float, 'floating client correctly focused');
|
2011-03-09 14:25:17 -05:00
|
|
|
|
|
|
|
done_testing;
|