Implement disabling the internal workspace bar

This commit is contained in:
Michael Stapelberg 2010-03-14 12:59:45 +01:00
parent 2df374ca4c
commit 2df1fb8ac8
3 changed files with 19 additions and 14 deletions

View File

@ -3,7 +3,7 @@
*
* i3 - an improved dynamic tiling window manager
*
* © 2009 Michael Stapelberg and contributors
* © 2009-2010 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
*
@ -682,6 +682,7 @@ void render_workspace(xcb_connection_t *conn, Output *output, Workspace *r_ws) {
height -= client->desired_height;
/* Space for the internal bar */
if (!config.disable_workspace_bar)
height -= (font->height + 6);
int xoffset[r_ws->rows];
@ -739,6 +740,7 @@ void render_workspace(xcb_connection_t *conn, Output *output, Workspace *r_ws) {
ignore_enter_notify_forall(conn, r_ws, false);
render_bars(conn, r_ws, width, &height);
if (!config.disable_workspace_bar)
render_internal_bar(conn, r_ws, width, font->height + 6);
}

View File

@ -173,7 +173,8 @@ void initialize_output(xcb_connection_t *conn, Output *output, Workspace *worksp
/* Map clients on the workspace, if any */
workspace_map_clients(conn, workspace);
/* Create a xoutput for each output */
/* Create a bar window on each output */
if (!config.disable_workspace_bar) {
Rect bar_rect = {output->rect.x,
output->rect.y + output->rect.height - (font->height + 6),
output->rect.x + output->rect.width,
@ -183,6 +184,7 @@ void initialize_output(xcb_connection_t *conn, Output *output, Workspace *worksp
output->bar = create_window(conn, bar_rect, XCB_WINDOW_CLASS_INPUT_OUTPUT, XCB_CURSOR_LEFT_PTR, true, mask, values);
output->bargc = xcb_generate_id(conn);
xcb_create_gc(conn, output->bargc, output->bar, 0, 0);
}
SLIST_INIT(&(output->dock_clients));

View File

@ -460,6 +460,7 @@ int workspace_height(Workspace *ws) {
height -= client->desired_height;
/* Space for the internal bar */
if (!config.disable_workspace_bar)
height -= (font->height + 6);
return height;