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:
@ -27,6 +27,7 @@
|
||||
#include "client.h"
|
||||
#include "floating.h"
|
||||
#include "handlers.h"
|
||||
#include "workspace.h"
|
||||
|
||||
/*
|
||||
* Updates *destination with new_value and returns true if it was changed or false
|
||||
@ -237,7 +238,7 @@ void reposition_client(xcb_connection_t *conn, Client *client) {
|
||||
|
||||
LOG("Client is on workspace %p with screen %p\n", client->workspace, client->workspace->screen);
|
||||
LOG("but screen at %d, %d is %p\n", client->rect.x, client->rect.y, screen);
|
||||
floating_assign_to_workspace(client, &workspaces[screen->current_workspace]);
|
||||
floating_assign_to_workspace(client, workspace_get(screen->current_workspace));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -585,7 +586,7 @@ static void render_internal_bar(xcb_connection_t *conn, Workspace *r_ws, int wid
|
||||
xcb_change_gc_single(conn, screen->bargc, XCB_GC_FONT, font->id);
|
||||
|
||||
int drawn = 0;
|
||||
for (int c = 0; c < 10; c++) {
|
||||
for (int c = 0; c < num_workspaces; c++) {
|
||||
if (workspaces[c].screen != screen)
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user