Make number of workspaces dynamic (no longer limited by 10)

Warning: This is not yet thoroughly tested, so be prepared to
encounter some segfaults. Please enable logging and coredumps,
so we can fix bugs quickly.
This commit is contained in:
Michael Stapelberg
2009-09-27 14:00:54 +02:00
parent a55d0b77fe
commit f38809288a
13 changed files with 149 additions and 65 deletions

View File

@ -25,6 +25,7 @@
#include "layout.h"
#include "client.h"
#include "table.h"
#include "workspace.h"
/*
* Removes the given client from the container, either because it will be inserted into another
@ -236,8 +237,9 @@ void client_toggle_fullscreen(xcb_connection_t *conn, Client *client) {
*/
void client_set_below_floating(xcb_connection_t *conn, Client *client) {
/* Ensure that it is below all floating clients */
Client *first_floating = TAILQ_FIRST(&(client->workspace->floating_clients));
if (first_floating != TAILQ_END(&(client->workspace->floating_clients))) {
Workspace *ws = client->workspace;
Client *first_floating = TAILQ_FIRST(&(ws->floating_clients));
if (first_floating != TAILQ_END(&(ws->floating_clients))) {
LOG("Setting below floating\n");
uint32_t values[] = { first_floating->frame, XCB_STACK_MODE_BELOW };
xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, values);