X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fx.c;h=6c5a11ecaf9cd22fd7e73284fa8d21c769a1f19d;hb=6f8b2845863e9071d7d630b270729d46423c1eb5;hp=aaa5b188e50691bf753295fefc087a45d52cd008;hpb=d805d1bbeaf89e11f67c981f94c9f55bbb4b89d9;p=i3%2Fi3 diff --git a/src/x.c b/src/x.c index aaa5b188..6c5a11ec 100644 --- a/src/x.c +++ b/src/x.c @@ -307,7 +307,6 @@ void x_draw_decoration(Con *con) { p->con_deco_rect = con->deco_rect; p->background = config.client.background; p->con_is_leaf = con_is_leaf(con); - p->font = config.font.id; if (con->deco_render_params != NULL && (con->window == NULL || !con->window->name_x_changed) && @@ -940,3 +939,19 @@ void x_set_warp_to(Rect *rect) { 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); + } +}