if (pane_call(parent, "Child-Notify", p, 1) < 0 ||
p->damaged & DAMAGED_CLOSED) {
/* ChildRegistered objected */
+ p->damaged |= DAMAGED_NOINIT;
pane_close(p);
p = NULL;
} else
p->parent->focus == p)
pane_refocus(p->parent);
- pane_call(p, "Close", p, infocus);
+ if (!(p->damaged & DAMAGED_NOINIT))
+ pane_call(p, "Close", p, infocus);
/* If a child has not yet had "Close" called, we need to leave
* ->parent in place so a full range of commands are available.
* hasn't been handled yet.
*/
DAMAGED_DEBUG = BIT(12),
+ DAMAGED_NOINIT = BIT(11), /* Closing before pane_register
+ * had a chance to complete.
+ */
};
#define DAMAGED_NEED_CALL (DAMAGED_SIZE | DAMAGED_REFRESH)