i3 - improved tiling WM


Bugfix: double X render on manage

Patch status: merged

Patch by Tony Crisci

Long description:

When a con is being managed, tree_render should only be called once to
push the changes to the rendering server to prevent wasting resources.

To apply this patch, use:
curl http://cr.i3wm.org/patch/555/raw.patch | git am

b/src/manage.c

15
@@ -481,17 +481,17 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
16
         ws->rect = ws->parent->rect;
17
         render_con(ws, true);
18
     }
19
-    tree_render();
20
+    render_con(croot, false);
21
 
22
     /* Send an event about window creation */
23
     ipc_send_window_event("new", nc);
24
 
25
     /* Defer setting focus after the 'new' event has been sent to ensure the
26
      * proper window event sequence. */
27
-    if (set_focus) {
28
+    if (set_focus)
29
         con_focus(nc);
30
-        tree_render();
31
-    }
32
+
33
+    tree_render();
34
 
35
     /* Windows might get managed with the urgency hint already set (Pidgin is
36
      * known to do that), so check for that and handle the hint accordingly.