retab! src/container.c
This commit is contained in:
parent
848d9c1b01
commit
3e53ecf69e
|
@ -21,23 +21,23 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int container_mode(Container *con, bool for_frame) {
|
int container_mode(Container *con, bool for_frame) {
|
||||||
int num_clients = 0;
|
int num_clients = 0;
|
||||||
Client *client;
|
Client *client;
|
||||||
|
|
||||||
if (con == NULL || con->mode == MODE_DEFAULT)
|
if (con == NULL || con->mode == MODE_DEFAULT)
|
||||||
return MODE_DEFAULT;
|
return MODE_DEFAULT;
|
||||||
|
|
||||||
if (!for_frame)
|
if (!for_frame)
|
||||||
return con->mode;
|
return con->mode;
|
||||||
|
|
||||||
CIRCLEQ_FOREACH(client, &(con->clients), clients)
|
CIRCLEQ_FOREACH(client, &(con->clients), clients)
|
||||||
num_clients++;
|
num_clients++;
|
||||||
|
|
||||||
/* If the container contains only one client, mode is irrelevant */
|
/* If the container contains only one client, mode is irrelevant */
|
||||||
if (num_clients == 1) {
|
if (num_clients == 1) {
|
||||||
DLOG("mode to default\n");
|
DLOG("mode to default\n");
|
||||||
return MODE_DEFAULT;
|
return MODE_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return con->mode;
|
return con->mode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue