]> git.sur5r.net Git - i3/i3/commitdiff
Merge branch 'master' into next
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 24 Sep 2012 21:59:30 +0000 (23:59 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 24 Sep 2012 21:59:30 +0000 (23:59 +0200)
src/manage.c

index 1dc39b9eabe18a2c88acc5e5b29e252c281721bd..9a5a4cf39555df2e4f5130959c93ead9bcba7e31 100644 (file)
@@ -381,6 +381,22 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
     /* Check if any assignments match */
     run_assignments(cwindow);
 
+    /* If this window was put onto an invisible workspace (via assignments), we
+     * render this workspace. It wouldn’t be rendered in our normal code path
+     * because only the visible workspaces get rendered.
+     *
+     * By rendering the workspace, we assign proper coordinates (read: not
+     * width=0, height=0) to the window, which is important for windows who
+     * actually use them to position their GUI elements, e.g. rhythmbox. */
+    if (ws && !workspace_is_visible(ws)) {
+        /* This is a bit hackish: we need to copy the content container’s rect
+         * to the workspace, because calling render_con() on the content
+         * container would also take the shortcut and not render the invisible
+         * workspace at all. However, just calling render_con() on the
+         * workspace isn’t enough either — it needs the rect. */
+        ws->rect = ws->parent->rect;
+        render_con(ws, true);
+    }
     tree_render();
 
 geom_out: