2010-06-01 20:52:59 +02:00
|
|
|
#!perl
|
|
|
|
# vim:ts=4:sw=4:expandtab
|
|
|
|
#
|
|
|
|
# Regression: make a container floating, kill its parent, make it tiling again
|
|
|
|
#
|
2011-03-09 20:25:17 +01:00
|
|
|
use i3test;
|
2010-06-01 20:52:59 +02:00
|
|
|
|
2011-03-09 20:25:17 +01:00
|
|
|
my $tmp = fresh_workspace;
|
2010-06-01 20:52:59 +02:00
|
|
|
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd 'open';
|
2010-11-28 21:11:14 +01:00
|
|
|
my $left = get_focused($tmp);
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd 'open';
|
2010-06-01 20:52:59 +02:00
|
|
|
my $old = get_focused($tmp);
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd 'split v';
|
|
|
|
cmd 'open';
|
2010-06-01 20:52:59 +02:00
|
|
|
my $floating = get_focused($tmp);
|
|
|
|
diag("focused floating: " . get_focused($tmp));
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd 'mode toggle';
|
2011-11-23 12:57:13 +01:00
|
|
|
sync_with_i3;
|
2010-11-28 21:11:14 +01:00
|
|
|
|
|
|
|
# kill old container
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd qq|[con_id="$old"] focus|;
|
2010-06-01 20:52:59 +02:00
|
|
|
is(get_focused($tmp), $old, 'old container focused');
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd 'kill';
|
2010-11-28 21:11:14 +01:00
|
|
|
|
|
|
|
# kill left container
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd qq|[con_id="$left"] focus|;
|
2010-11-28 21:11:14 +01:00
|
|
|
is(get_focused($tmp), $left, 'old container focused');
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd 'kill';
|
2010-11-28 21:11:14 +01:00
|
|
|
|
|
|
|
# focus floating window, make it tiling again
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd qq|[con_id="$floating"] focus|;
|
2010-06-01 20:52:59 +02:00
|
|
|
is(get_focused($tmp), $floating, 'floating window focused');
|
|
|
|
|
2011-11-23 12:57:13 +01:00
|
|
|
sync_with_i3;
|
2011-03-09 20:25:17 +01:00
|
|
|
cmd 'mode toggle';
|
2010-06-01 20:52:59 +02:00
|
|
|
|
2011-01-28 01:21:38 +01:00
|
|
|
does_i3_live;
|
2010-06-01 20:52:59 +02:00
|
|
|
|
2011-03-09 20:25:17 +01:00
|
|
|
done_testing;
|