#include "client.h"
#include "log.h"
#include "ewmh.h"
+#include "ipc.h"
/*
* Returns a pointer to the workspace with the given number (starting at 0),
workspace_set_name(ws, NULL);
TAILQ_INSERT_TAIL(workspaces, ws, workspaces);
+
+ ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"init\"}");
}
DLOG("done\n");
errx(1, "asprintf() failed");
FREE(ws->name);
+ FREE(ws->utf8_name);
ws->name = convert_utf8_to_ucs2(label, &(ws->name_len));
if (config.font != NULL)
ws->text_width = predict_text_width(global_conn, config.font, ws->name, ws->name_len);
else ws->text_width = 0;
-
- free(label);
+ ws->utf8_name = label;
}
/*
if ((old_client != NULL) && !old_client->dock)
redecorate_window(conn, old_client);
else xcb_flush(conn);
+
+ /* We need to check if a global fullscreen-client is blocking
+ * the t_ws and if necessary switch that to local fullscreen */
+ Client* client = c_ws->fullscreen_client;
+ if (client != NULL && client->workspace != c_ws) {
+ if (c_ws->fullscreen_client->workspace != c_ws)
+ c_ws->fullscreen_client = NULL;
+ client_enter_fullscreen(conn, client, false);
+ }
}
/* Check if we need to change something or if we’re already there */
xcb_flush(conn);
}
+ ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"focus\"}");
+
return;
}
current_col = c_ws->current_col;
DLOG("new current row = %d, current col = %d\n", current_row, current_col);
+ ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"focus\"}");
+
workspace_map_clients(conn, c_ws);
/* POTENTIAL TO IMPROVE HERE: due to the call to _map_clients first and
* the preferred_output setting of every workspace (workspace assignments).
*
*/
-Workspace *get_first_workspace_for_screen(Output *output) {
+Workspace *get_first_workspace_for_output(Output *output) {
Workspace *result = NULL;
Workspace *ws;
/* Map all stack windows, if any */
struct Stack_Window *stack_win;
SLIST_FOREACH(stack_win, &stack_wins, stack_windows)
- if (stack_win->container->workspace == ws)
+ if (stack_win->container->workspace == ws && stack_win->rect.height > 0)
xcb_map_window(conn, stack_win->window);
ignore_enter_notify_forall(conn, ws, false);