route_click: Remove condition that is always true
For reference: typedef enum { CLICK_BORDER = 0, CLICK_DECORATION = 1, CLICK_INSIDE = 2 } click_destination_t;
This commit is contained in:
parent
07c7384272
commit
58d383b1a0
23
src/click.c
23
src/click.c
|
@ -162,21 +162,18 @@ static void route_click(Con *con, xcb_button_press_event_t *event, const bool mo
|
||||||
|
|
||||||
/* if the user has bound an action to this click, it should override the
|
/* if the user has bound an action to this click, it should override the
|
||||||
* default behavior. */
|
* default behavior. */
|
||||||
if (dest == CLICK_DECORATION || dest == CLICK_INSIDE || dest == CLICK_BORDER) {
|
Binding *bind = get_binding_from_xcb_event((xcb_generic_event_t *)event);
|
||||||
Binding *bind = get_binding_from_xcb_event((xcb_generic_event_t *)event);
|
if (bind && ((dest == CLICK_DECORATION && !bind->exclude_titlebar) ||
|
||||||
|
(dest == CLICK_INSIDE && bind->whole_window) ||
|
||||||
|
(dest == CLICK_BORDER && bind->border))) {
|
||||||
|
CommandResult *result = run_binding(bind, con);
|
||||||
|
|
||||||
if (bind != NULL && ((dest == CLICK_DECORATION && !bind->exclude_titlebar) ||
|
/* ASYNC_POINTER eats the event */
|
||||||
(dest == CLICK_INSIDE && bind->whole_window) ||
|
xcb_allow_events(conn, XCB_ALLOW_ASYNC_POINTER, event->time);
|
||||||
(dest == CLICK_BORDER && bind->border))) {
|
xcb_flush(conn);
|
||||||
CommandResult *result = run_binding(bind, con);
|
|
||||||
|
|
||||||
/* ASYNC_POINTER eats the event */
|
command_result_free(result);
|
||||||
xcb_allow_events(conn, XCB_ALLOW_ASYNC_POINTER, event->time);
|
return;
|
||||||
xcb_flush(conn);
|
|
||||||
|
|
||||||
command_result_free(result);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* There is no default behavior for button release events so we are done. */
|
/* There is no default behavior for button release events so we are done. */
|
||||||
|
|
Loading…
Reference in New Issue