X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fclick.c;h=2092b6e7224d41a6a06d65e9e6f625efa29001c1;hb=4be3178d4d360c2996217d811e61161c84d25898;hp=8c0d7f661b186a0c6e5b70c9e1a704a7f055b46a;hpb=24463718cc2ae6d44d75104bb8ade636985ff86c;p=i3%2Fi3 diff --git a/src/click.c b/src/click.c index 8c0d7f66..2092b6e7 100644 --- a/src/click.c +++ b/src/click.c @@ -39,9 +39,12 @@ static bool tiling_resize_for_border(Con *con, border_t border, xcb_button_press Con *first = NULL, *second = NULL; Con *resize_con = con; while (resize_con->type != CT_WORKSPACE && - resize_con->parent->orientation != orientation) + resize_con->type != CT_FLOATING_CON && + resize_con->parent->orientation != orientation) resize_con = resize_con->parent; + if (resize_con->type != CT_WORKSPACE && + resize_con->type != CT_FLOATING_CON && resize_con->parent->orientation == orientation) { first = resize_con; second = (way == 'n') ? TAILQ_NEXT(first, nodes) : TAILQ_PREV(first, nodes_head, nodes); @@ -150,6 +153,10 @@ static int route_click(Con *con, xcb_button_press_event_t *event, bool mod_press DLOG("--> OUTCOME = %p\n", con); DLOG("type = %d, name = %s\n", con->type, con->name); + /* don’t handle dockarea cons, they must not be focused */ + if (con->parent->type == CT_DOCKAREA) + goto done; + /* get the floating con */ Con *floatingcon = con_inside_floating(con); const bool proportional = (event->state & BIND_SHIFT); @@ -236,7 +243,7 @@ done: * Then, route_click is called on the appropriate con. * */ -int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button_press_event_t *event) { +int handle_button_press(xcb_button_press_event_t *event) { Con *con; DLOG("Button %d pressed on window 0x%08x\n", event->state, event->event);