Files
debian
docs
i3-config-wizard
i3-input
i3-msg
i3-nagbar
i3bar
include
man
render-tree
src
testcases
t
lib
00-load.t
01-tile.t
02-fullscreen.t
03-unmanaged.t
04-floating.t
05-ipc.t
06-focus.t
07-move.t
08-focus-stack.t
09-stacking.t
10-dock.t
11-goto.t
12-floating-resize.t
13-urgent.t
14-client-leader.t
15-ipc-workspaces.t
16-nestedcons.t
17-workspace.t
18-openkill.t
19-match.t
20-multiple-cmds.t
21-next-prev.t
22-split.t
24-move.t
26-regress-close.t
27-regress-floating-parent.t
28-open-order.t
29-focus-after-close.t
30-close-empty-split.t
31-stacking-order.t
32-move-workspace.t
33-size-hints.t
34-invalid-command.t
35-floating-focus.t
36-floating-ws-empty.t
37-floating-unmap.t
38-floating-attach.t
39-ws-numbers.t
40-focus-lost.t
41-resize.t
42-regress-move-floating.t
43-regress-floating-restart.t
44-regress-floating-resize.t
45-flattening.t
46-floating-reinsert.t
47-regress-floatingmove.t
48-regress-floatingmovews.t
50-regress-dock-restart.t
51-regress-float-size.t
52-regress-level-up.t
53-floating-originalsize.t
54-regress-multiple-dock.t
55-floating-split-size.t
56-fullscreen-focus.t
57-regress-fullscreen-level-up.t
58-wm_take_focus.t
59-socketpaths.t
61-regress-borders-restart.t
62-regress-dock-urgent.t
63-wm-state.t
64-kill-win-vs-client.t
65-for_window.t
66-assign.t
67-workspace_layout.t
68-regress-fullscreen-restart.t
69-border-toggle.t
70-force_focus_wrapping.t
71-config-migrate.t
72-start-on-named-ws.t
73-get-marks.t
73-regress-focus-assign.t
74-border-config.t
74-regress-focus-toggle.t
Makefile
Xdummy
complete-run.pl
i3-test.config
tests
yajl-fallback
.gitignore
CMDMODE
DEPENDS
GOALS
LICENSE
Makefile
PACKAGE-MAINTAINER
RELEASE-NOTES-4.0
RELEASE-NOTES-4.0.1
RELEASE-NOTES-4.0.2
TODO
common.mk
dump-asy.pl
gtk-tree-watch.pl
i3-migrate-config-to-v4
i3-wsbar
i3.config
i3.config.keycodes
i3.desktop
i3.welcome
logo.svg
pseudo-doc.doxygen
i3/testcases/t/56-fullscreen-focus.t
Michael Stapelberg 49ea805905 tests: get the socket path from the X11 atom I3_SOCKET_PATH
The hard-coded socket paths are not useful when running the test suite in
parallel.
2011-07-25 13:35:56 +02:00

64 lines
1.5 KiB
Perl

#!perl
# vim:ts=4:sw=4:expandtab
#
# Test if new containers get focused when there is a fullscreen container at
# the time of launching the new one.
#
use X11::XCB qw(:all);
use i3test;
BEGIN {
use_ok('X11::XCB::Window');
}
my $x = X11::XCB::Connection->new;
my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
#####################################################################
# open the left window
#####################################################################
my $left = open_standard_window($x, '#ff0000');
is($x->input_focus, $left->id, 'left window focused');
diag("left = " . $left->id);
#####################################################################
# Open the right window
#####################################################################
my $right = open_standard_window($x, '#00ff00');
diag("right = " . $right->id);
#####################################################################
# Set the right window to fullscreen
#####################################################################
cmd 'nop setting fullscreen';
cmd 'fullscreen';
#####################################################################
# Open a third window
#####################################################################
my $third = open_standard_window($x, '#0000ff');
diag("third = " . $third->id);
# move the fullscreen window to a different ws
my $tmp2 = get_unused_workspace;
cmd "move workspace $tmp2";
# verify that the third window has the focus
sleep 0.25;
is($x->input_focus, $third->id, 'third window focused');
done_testing;