4 * i3 - an improved dynamic tiling window manager
6 * © 2009 Michael Stapelberg and contributors
8 * See file LICENSE for license information.
10 * workspace.c: Functions for modifying workspaces
21 * Sets the name (or just its number) for the given workspace. This has to
22 * be called for every workspace as the rendering function
23 * (render_internal_bar) relies on workspace->name and workspace->name_len
27 void workspace_set_name(Workspace *ws, const char *name) {
32 ret = asprintf(&label, "%d: %s", ws->num + 1, name);
33 else ret = asprintf(&label, "%d", ws->num + 1);
36 errx(1, "asprintf() failed");
40 ws->name = convert_utf8_to_ucs2(label, &(ws->name_len));