*/
void x_set_warp_to(Rect *rect);
+/**
+ * Applies the given mask to the event mask of every i3 window decoration X11
+ * window. This is useful to disable EnterNotify while resizing so that focus
+ * is untouched.
+ *
+ */
+void x_mask_event_mask(uint32_t mask);
+
#endif
Con *output = con_get_output(first);
DLOG("x = %d, width = %d\n", output->rect.x, output->rect.width);
+ x_mask_event_mask(~XCB_EVENT_MASK_ENTER_WINDOW);
+ xcb_flush(conn);
+
uint32_t mask = 0;
uint32_t values[2];
{
warp_to = rect;
}
+
+/*
+ * Applies the given mask to the event mask of every i3 window decoration X11
+ * window. This is useful to disable EnterNotify while resizing so that focus
+ * is untouched.
+ *
+ */
+void x_mask_event_mask(uint32_t mask) {
+ uint32_t values[] = { FRAME_EVENT_MASK & mask };
+
+ con_state *state;
+ CIRCLEQ_FOREACH_REVERSE(state, &state_head, state) {
+ if (state->mapped)
+ xcb_change_window_attributes(conn, state->id, XCB_CW_EVENT_MASK, values);
+ }
+}