Go to file
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
contrib i3bar-protocol: add example (illustration-only!) shell script, clarify {"version":1} header 2012-08-12 18:47:24 +02:00
debian debian: make 'i3' recommend dunst 2012-08-13 13:44:54 +02:00
docs Make the initial mention of 'split h/v' a little easier to understand. 2012-08-31 00:16:58 +02:00
i3-config-wizard fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
i3-dump-log fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
i3-input fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
i3-msg fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
i3-nagbar fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
i3bar fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
include logging: make libi3 use verboselog()/errorlog(), provide it in each caller 2012-08-13 13:27:16 +02:00
libi3 fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
man manpage: update force-xinerama nvidia hint 2012-08-27 15:25:22 +02:00
parser-specs Introduce splith/splitv layouts, remove orientation 2012-08-04 03:13:24 +02:00
src con_set_layout: always use the parent container, handle workspaces properly 2012-09-05 00:22:38 +02:00
testcases con_set_layout: always use the parent container, handle workspaces properly 2012-09-05 00:22:38 +02:00
tests implement TAILQ_SWAP (only for consecutive elements, order relevant) and use it 2011-02-15 02:21:23 +01:00
yajl-fallback/yajl Make code compatible with yajl 2.0 *and* 1.0 2011-04-27 19:52:53 +02:00
.gitignore update .gitignore (Thanks SardemFF7) 2012-08-07 10:03:37 +02:00
common.mk fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
DEPENDS remove xcb-proto from DEPENDS, it’s only a build-time dep of libxcb (Thanks okraits) 2012-09-04 16:53:06 +02:00
generate-command-parser.pl Display i3-nagbar when commands lead to an error 2012-08-02 17:45:09 +02:00
i3-migrate-config-to-v4 i3-migrate-config-to-v4: use layout toggle split (Thanks eeemsi) 2012-08-04 12:46:37 +02:00
i3-sensible-editor update i3-sensible-* (Thanks Han) 2011-12-29 00:01:49 +01:00
i3-sensible-pager update i3-sensible-* (Thanks Han) 2011-12-29 00:01:49 +01:00
i3-sensible-terminal Add xfce4-terminal to i3-sensible-terminal 2012-08-02 15:20:17 +02:00
i3.applications.desktop /usr/share/applications/i3.desktop: drop the encoding key, UTF-8 is now required 2012-04-25 23:18:22 +02:00
i3.config default config: include a short explanation about xft fonts 2012-08-13 13:34:30 +02:00
i3.config.keycodes default config: include a short explanation about xft fonts 2012-08-13 13:34:30 +02:00
i3.xsession.desktop Also install /usr/share/applications/i3.desktop 2012-01-26 18:16:13 +00:00
LICENSE remove obsolete CMDMODE and TODO files, update LICENSE 2011-10-08 15:18:04 +01:00
logo.svg s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
Makefile unbreak the build 2012-08-05 14:38:52 +02:00
PACKAGE-MAINTAINER Introduce the i3-sensible-{pager,editor,terminal} scripts 2011-09-25 18:46:37 +01:00
pseudo-doc.doxygen s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
RELEASE-NOTES-4.2 add release notes for v4.2 2012-04-25 23:06:39 +02:00
RELEASE-NOTES-4.3 update DEPENDS, prepare RELEASE-NOTES for 4.3 2012-08-18 15:33:36 +02:00