Decoration click/mouse move: iterate children in reverse order
In the case of decoration overlap, we should handle the one that is drawn on top, i.e., the last one.
This commit is contained in:
committed by
Orestis Floros
parent
e6ca7ca06f
commit
670c23600f
@ -361,7 +361,7 @@ int handle_button_press(xcb_button_press_event_t *event) {
|
||||
|
||||
/* Check if the click was on the decoration of a child */
|
||||
Con *child;
|
||||
TAILQ_FOREACH (child, &(con->nodes_head), nodes) {
|
||||
TAILQ_FOREACH_REVERSE (child, &(con->nodes_head), nodes_head, nodes) {
|
||||
if (!rect_contains(child->deco_rect, event->event_x, event->event_y))
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user