*/
void x_draw_decoration(Con *con);
+/**
+ * This function pushes the properties of each node of the layout tree to
+ * X11 if they have changed (like the map state, position of the window, …).
+ * It recursively traverses all children of the given node.
+ *
+ */
+void x_push_node(Con *con, bool skip_decoration);
+
/**
* Pushes all changes (state of each node, see x_push_node() and the window
* stack) to X11.
/* Reposition the client correctly while moving */
con->rect.x = old_rect->x + (new_x - event->root_x);
con->rect.y = old_rect->y + (new_y - event->root_y);
- /* TODO: don’t re-render the whole tree just because we change
- * coordinates of a floating window */
- tree_render();
- x_push_changes(croot);
+
+ render_con(con, false);
+ x_push_node(con, true);
+ xcb_flush(conn);
}
/*
* It recursively traverses all children of the given node.
*
*/
-static void x_push_node(Con *con) {
+void x_push_node(Con *con, bool skip_decoration) {
Con *current;
con_state *state;
Rect rect = con->rect;
* in focus order to display the focused client in a stack first when
* switching workspaces (reduces flickering). */
TAILQ_FOREACH(current, &(con->focus_head), focused)
- x_push_node(current);
+ x_push_node(current, skip_decoration);
- if (con->type != CT_ROOT && con->type != CT_OUTPUT && con->mapped)
+ if (!skip_decoration &&
+ (con->type != CT_ROOT && con->type != CT_OUTPUT) &&
+ con->mapped)
x_draw_decoration(con);
}
DLOG("Done, EnterNotify re-enabled\n");
DLOG("\n\n PUSHING CHANGES\n\n");
- x_push_node(con);
+ x_push_node(con, false);
xcb_window_t to_focus = focused->frame;
if (focused->window != NULL)