]> git.sur5r.net Git - i3/i3/commitdiff
Implement disabling the internal workspace bar
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 14 Mar 2010 11:59:45 +0000 (12:59 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 14 Mar 2010 11:59:45 +0000 (12:59 +0100)
src/layout.c
src/randr.c
src/workspace.c

index 04f9cf60a84b13729753333dc4deba483dcef62b..202f5601d09fdf5da7233efddabf7c22a3f64c84 100644 (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,7 +682,8 @@ void render_workspace(xcb_connection_t *conn, Output *output, Workspace *r_ws) {
                 height -= client->desired_height;
 
         /* Space for the internal bar */
-        height -= (font->height + 6);
+        if (!config.disable_workspace_bar)
+                height -= (font->height + 6);
 
         int xoffset[r_ws->rows];
         int yoffset[r_ws->cols];
@@ -739,7 +740,8 @@ 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);
-        render_internal_bar(conn, r_ws, width, font->height + 6);
+        if (!config.disable_workspace_bar)
+                render_internal_bar(conn, r_ws, width, font->height + 6);
 }
 
 /*
index 7cf9d5147d67fbdb5aef4b7be3541c7a2ab01ab2..9ef45fd0fe734c7be6fcef56b20fe2564f5ae6ef 100644 (file)
@@ -173,16 +173,18 @@ 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 */
-        Rect bar_rect = {output->rect.x,
-                         output->rect.y + output->rect.height - (font->height + 6),
-                         output->rect.x + output->rect.width,
-                         font->height + 6};
-        uint32_t mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK;
-        uint32_t values[] = {1, XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS};
-        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);
+        /* 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,
+                                 font->height + 6};
+                uint32_t mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK;
+                uint32_t values[] = {1, XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS};
+                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));
 
index 3b8c6ba4b2a5f2e4fab109de23868068845a5e8a..8d76272925ff8ff5b3d9eb754ffac2147d252072 100644 (file)
@@ -460,7 +460,8 @@ int workspace_height(Workspace *ws) {
                 height -= client->desired_height;
 
         /* Space for the internal bar */
-        height -= (font->height + 6);
+        if (!config.disable_workspace_bar)
+                height -= (font->height + 6);
 
         return height;
 }