On button press events, the only change in state that would presently
require rerendering the tree is when the focused window changes.
DLOG("--> OUTCOME = %p\n", con);
DLOG("type = %d, name = %s\n", con->type, con->name);
+ /* if focus changes, we must rerender */
+ Con *initially_focused = focused;
+
/* don’t handle dockarea cons, they must not be focused */
if (con->parent->type == CT_DOCKAREA)
goto done;
done:
xcb_allow_events(conn, XCB_ALLOW_REPLAY_POINTER, event->time);
xcb_flush(conn);
- tree_render();
+
+ if (initially_focused != focused)
+ tree_render();
+
return 0;
}