]> git.sur5r.net Git - i3/i3/blobdiff - src/layout.c
Bugfix: Also fix horizontal resizing
[i3/i3] / src / layout.c
index 37efdd047e0a14940f49a148e01a53b495cc8eba..34e9b03d788ade3f83d199e25255bfcc74b426ab 100644 (file)
@@ -65,17 +65,7 @@ int get_unoccupied_x(Workspace *workspace) {
 
 /* See get_unoccupied_x() */
 int get_unoccupied_y(Workspace *workspace) {
-        int height = workspace->rect.height;
-        i3Font *font = load_font(global_conn, config.font);
-
-        /* Reserve space for dock clients */
-        Client *client;
-        SLIST_FOREACH(client, &(workspace->screen->dock_clients), dock_clients)
-                height -= client->desired_height;
-
-        /* Space for the internal bar */
-        height -= (font->height + 6);
-
+        int height = workspace_height(workspace);
         int unoccupied = height;
         float default_factor = ((float)height / workspace->rows) / height;