diff --git a/src/click.c b/src/click.c index 33d5a4d7..22e70b9f 100644 --- a/src/click.c +++ b/src/click.c @@ -311,7 +311,9 @@ done: */ 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); + DLOG("Button %d pressed on window 0x%08x (child 0x%08x) at (%d, %d) (root %d, %d)\n", + event->state, event->event, event->child, event->event_x, event->event_y, + event->root_x, event->root_y); last_timestamp = event->time; @@ -347,6 +349,11 @@ int handle_button_press(xcb_button_press_event_t *event) { return 0; } + if (event->child != XCB_NONE) { + DLOG("event->child not XCB_NONE, so this is an event which originated from a click into the application, but the application did not handle it.\n"); + return route_click(con, event, mod_pressed, CLICK_INSIDE); + } + /* Check if the click was on the decoration of a child */ Con *child; TAILQ_FOREACH(child, &(con->nodes_head), nodes) {