close(xcb_get_file_descriptor(conn));
- setenv("LD_PRELOAD", SWM_LIB, 1);
+ if ((ret = getenv("LD_PRELOAD"))) {
+ if (asprintf(&ret, "%s:%s", SWM_LIB, ret) == -1) {
+ warn("spawn: asprintf LD_PRELOAD");
+ _exit(1);
+ }
+ setenv("LD_PRELOAD", ret, 1);
+ free(ret);
+ } else {
+ setenv("LD_PRELOAD", SWM_LIB, 1);
+ }
if (asprintf(&ret, "%d", ws_idx) == -1) {
warn("spawn: asprintf SWM_WS");
r->s->r_focus = r;
+ /* Update the focus window frame on the now unfocused region. */
+ if (rf && rf->ws->focus)
+ draw_frame(rf->ws->focus);
+
ewmh_update_current_desktop();
}