2009-08-05 15:37:11 -04: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)
|
2009-08-05 15:37:11 -04:00
|
|
|
|
2011-03-09 14:25:17 -05:00
|
|
|
use i3test;
|
2009-08-05 15:37:11 -04:00
|
|
|
|
2011-03-09 14:25:17 -05:00
|
|
|
fresh_workspace;
|
2009-08-05 15:37:11 -04:00
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
# Ensure IPC works by switching workspaces
|
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
# Create a window so we can get a focus different from NULL
|
2011-11-21 18:47:32 -05:00
|
|
|
my $window = open_window;
|
2009-08-05 15:37:11 -04:00
|
|
|
|
2009-10-26 15:04:37 -04:00
|
|
|
my $focus = $x->input_focus;
|
2009-08-05 15:37:11 -04:00
|
|
|
|
2011-03-09 14:25:17 -05:00
|
|
|
# Switch to another workspace
|
|
|
|
fresh_workspace;
|
2009-08-05 15:37:11 -04:00
|
|
|
|
2011-11-21 19:13:37 -05:00
|
|
|
sync_with_i3;
|
2009-10-26 15:04:37 -04:00
|
|
|
my $new_focus = $x->input_focus;
|
2009-08-05 15:37:11 -04:00
|
|
|
isnt($focus, $new_focus, "Focus changed");
|
|
|
|
|
2011-03-09 14:25:17 -05:00
|
|
|
done_testing;
|