4 * i3 - an improved dynamic tiling window manager
6 * © 2009 Michael Stapelberg and contributors
8 * See file LICENSE for license information.
16 * Returns the mode of the given container (or MODE_DEFAULT if a NULL pointer
17 * was passed in order to save a few explicit checks in other places). If
18 * for_frame was set to true, the special case of having exactly one client
19 * in a container is handled so that MODE_DEFAULT is returned. For some parts
20 * of the rendering, this is interesting, other parts need the real mode.
23 int container_mode(Container *con, bool for_frame) {
27 if (con == NULL || con->mode == MODE_DEFAULT)
33 CIRCLEQ_FOREACH(client, &(con->clients), clients)
36 /* If the container contains only one client, mode is irrelevant */
37 if (num_clients == 1) {
38 DLOG("mode to default\n");