draw leaf window decorations on ->frame instead of ->parent->frame
related to https://github.com/i3/i3/issues/3724 fixes https://github.com/i3/i3/issues/1966
This commit is contained in:
committed by
Michael Stapelberg
parent
6e6af01b7a
commit
d26ddcbfe5
19
src/click.c
19
src/click.c
@ -404,13 +404,20 @@ void handle_button_press(xcb_button_press_event_t *event) {
|
||||
}
|
||||
|
||||
/* Check if the click was on the decoration of a child */
|
||||
Con *child;
|
||||
TAILQ_FOREACH_REVERSE (child, &(con->nodes_head), nodes_head, nodes) {
|
||||
if (!rect_contains(child->deco_rect, event->event_x, event->event_y))
|
||||
continue;
|
||||
if (con->window != NULL) {
|
||||
if (rect_contains(con->deco_rect, event->event_x, event->event_y)) {
|
||||
route_click(con, event, mod_pressed, CLICK_DECORATION);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
Con *child;
|
||||
TAILQ_FOREACH_REVERSE (child, &(con->nodes_head), nodes_head, nodes) {
|
||||
if (!rect_contains(child->deco_rect, event->event_x, event->event_y))
|
||||
continue;
|
||||
|
||||
route_click(child, event, mod_pressed, CLICK_DECORATION);
|
||||
return;
|
||||
route_click(child, event, mod_pressed, CLICK_DECORATION);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (event->child != XCB_NONE) {
|
||||
|
Reference in New Issue
Block a user