gri3-wm/testcases
Michael Stapelberg 4976fa3350 con_set_layout: always use the parent container, handle workspaces properly
Previously, in case 'layout stacked' (for example) had been called
interactively, con_set_layout would be called with focused->parent,
while with for_window, it’d be called on the actual matching container.

This difference in behavior was the cause for the inability to use
'for_window [class="XTerm"] layout tabbed', which now works \o/, but
more on that below.

The change also allows us to handle the case of the user selecting a
CT_WORKSPACE container properly, that is, by using the special case and
creating a new split container on the workspace which gets all the
contents, but a new layout.

Now, before you are enthusiastic about the change and try to use
for_window magic in your config file, keep in mind: The 'layout' command
acts on the parent split container. That is, when using a line such as
this one:

    for_window [class="XTerm"] layout tabbed

…and opening an XTerm when on a workspace with one single other window,
the whole workspace will be set tabbed (just as previously when you
opened an XTerm and sent 'layout tabbed' manually).

Therefore, to open XTerm in its own tabbed split container, you need to
split before:

    for_window [class="XTerm"] split v, layout tabbed

The comma here is important! It says that the second command should not
be treated as an entirely unrelated command, but it should also relate
the matching window (while it does work with a ';', that is prone to
race-conditions and should be avoided).

fixes #358
2012-09-05 00:22:38 +02:00
..
lib tests: introduce is_num_children test 2012-09-04 22:24:13 +02:00
t con_set_layout: always use the parent container, handle workspaces properly 2012-09-05 00:22:38 +02:00
Makefile.PL testcases: add ExtUtils::PkgConfig as explicit dependency 2012-08-31 00:17:06 +02:00
Xdummy add Xdummy script to start a headless X11 server 2011-07-25 15:37:46 +02:00
complete-run.pl complete-run: check whether Xdummy dies, add a flag to keep the Xdummy output 2012-08-18 16:27:00 +02:00
i3-test.config tests: make t/65-for-window.t use separate i3 instances 2011-08-02 19:21:09 +02:00
restart-state.golden tests: implement restart testing (actual option still missing) 2011-12-21 23:15:30 +00:00