debian
docs
i3-config-wizard
i3-input
i3-msg
i3-nagbar
i3bar
include
libi3
man
render-tree
src
testcases
lib
t
000-load-deps.t
001-tile.t
002-i3-sync.t
003-ipc.t
004-unmanaged.t
005-floating.t
100-fullscreen.t
101-focus.t
102-dock.t
103-move.t
104-focus-stack.t
105-stacking.t
111-goto.t
112-floating-resize.t
113-urgent.t
114-client-leader.t
115-ipc-workspaces.t
116-nestedcons.t
117-workspace.t
118-openkill.t
119-match.t
120-multiple-cmds.t
121-next-prev.t
122-split.t
124-move.t
126-regress-close.t
127-regress-floating-parent.t
128-open-order.t
129-focus-after-close.t
130-close-empty-split.t
131-stacking-order.t
132-move-workspace.t
133-size-hints.t
134-invalid-command.t
135-floating-focus.t
136-floating-ws-empty.t
137-floating-unmap.t
138-floating-attach.t
139-ws-numbers.t
140-focus-lost.t
141-resize.t
142-regress-move-floating.t
143-regress-floating-restart.t
144-regress-floating-resize.t
145-flattening.t
146-floating-reinsert.t
147-regress-floatingmove.t
148-regress-floatingmovews.t
150-regress-dock-restart.t
151-regress-float-size.t
152-regress-level-up.t
153-floating-originalsize.t
154-regress-multiple-dock.t
155-floating-split-size.t
156-fullscreen-focus.t
157-regress-fullscreen-level-up.t
158-wm_take_focus.t
159-socketpaths.t
161-regress-borders-restart.t
162-regress-dock-urgent.t
163-wm-state.t
164-kill-win-vs-client.t
165-for_window.t
166-assign.t
167-workspace_layout.t
168-regress-fullscreen-restart.t
169-border-toggle.t
170-force_focus_wrapping.t
171-config-migrate.t
172-start-on-named-ws.t
173-get-marks.t
173-regress-focus-assign.t
174-border-config.t
174-regress-focus-toggle.t
175-startup-notification.t
176-workspace-baf.t
177-bar-config.t
178-regress-workspace-open.t
Makefile.PL
Xdummy
complete-run.pl
i3-test.config
tests
yajl-fallback
.gitignore
DEPENDS
GOALS
LICENSE
Makefile
PACKAGE-MAINTAINER
RELEASE-NOTES-4.0
RELEASE-NOTES-4.0.1
RELEASE-NOTES-4.0.2
common.mk
dump-asy.pl
gtk-tree-watch.pl
i3-migrate-config-to-v4
i3-sensible-editor
i3-sensible-pager
i3-sensible-terminal
i3-wsbar
i3.config
i3.config.keycodes
i3.desktop
i3.welcome
logo.svg
pseudo-doc.doxygen
72 lines
1.9 KiB
Perl
72 lines
1.9 KiB
Perl
#!perl
|
|
# vim:ts=4:sw=4:expandtab
|
|
# Regression test: New windows were attached to the container of a floating window
|
|
# if only a floating window is present on the workspace.
|
|
|
|
use i3test;
|
|
use X11::XCB qw(:all);
|
|
|
|
BEGIN {
|
|
use_ok('X11::XCB::Window');
|
|
}
|
|
|
|
my $i3 = i3(get_socket_path());
|
|
|
|
my $tmp = fresh_workspace;
|
|
|
|
#############################################################################
|
|
# 1: open a floating window, get it mapped
|
|
#############################################################################
|
|
|
|
my $x = X11::XCB::Connection->new;
|
|
|
|
# Create a floating window
|
|
my $window = open_floating_window($x);
|
|
ok($window->mapped, 'Window is mapped');
|
|
|
|
my $ws = get_ws($tmp);
|
|
my ($nodes, $focus) = get_ws_content($tmp);
|
|
|
|
is(@{$ws->{floating_nodes}}, 1, 'one floating node');
|
|
is(@{$nodes}, 0, 'no tiling nodes');
|
|
|
|
# Create a tiling window
|
|
my $twindow = open_window($x);
|
|
|
|
($nodes, $focus) = get_ws_content($tmp);
|
|
|
|
is(@{$nodes}, 1, 'one tiling node');
|
|
|
|
#############################################################################
|
|
# 2: similar case: floating windows should be attached at the currently focused
|
|
# position in the workspace (for example a stack), not just at workspace level.
|
|
#############################################################################
|
|
|
|
$tmp = fresh_workspace;
|
|
|
|
my $first = open_window($x);
|
|
my $second = open_window($x);
|
|
|
|
cmd 'layout stacked';
|
|
|
|
$ws = get_ws($tmp);
|
|
is(@{$ws->{floating_nodes}}, 0, 'no floating nodes so far');
|
|
is(@{$ws->{nodes}}, 1, 'one tiling node (stacked con)');
|
|
|
|
# Create a floating window
|
|
my $window = open_floating_window($x);
|
|
ok($window->mapped, 'Window is mapped');
|
|
|
|
$ws = get_ws($tmp);
|
|
is(@{$ws->{floating_nodes}}, 1, 'one floating nodes');
|
|
is(@{$ws->{nodes}}, 1, 'one tiling node (stacked con)');
|
|
|
|
my $third = open_window($x);
|
|
|
|
|
|
$ws = get_ws($tmp);
|
|
is(@{$ws->{floating_nodes}}, 1, 'one floating nodes');
|
|
is(@{$ws->{nodes}}, 1, 'one tiling node (stacked con)');
|
|
|
|
done_testing;
|