Implement options to change the default mode of containers

The following new directives have been implemented for the configuration
file:

	new_container <default|stacking|tabbed>
	new_container stack-limit <cols|rows> <value>

Note that they require using the new lexer/parser, which you can
do by passing -l to i3 when starting.
This commit is contained in:
Michael Stapelberg
2009-09-27 23:08:27 +02:00
parent fa868ed61c
commit e101940c5e
8 changed files with 92 additions and 14 deletions

View File

@ -352,10 +352,13 @@ void switch_layout_mode(xcb_connection_t *conn, Container *container, int mode)
if (container->mode == MODE_STACK || container->mode == MODE_TABBED)
goto after_stackwin;
/* When entering stacking mode, we need to open a window on which we can draw the
title bars of the clients, it has height 1 because we dont bother here with
calculating the correct height - it will be adjusted when rendering anyways. */
Rect rect = {container->x, container->y, container->width, 1};
/* When entering stacking mode, we need to open a window on
* which we can draw the title bars of the clients, it has
* height 1 because we dont bother here with calculating the
* correct height - it will be adjusted when rendering anyways.
* Also, we need to use max(width, 1) because windows cannot
* be created with either width == 0 or height == 0. */
Rect rect = {container->x, container->y, max(container->width, 1), 1};
uint32_t mask = 0;
uint32_t values[2];