Implement click on stack/tab decoration to focus
This commit is contained in:
parent
df7788386d
commit
db3002fce0
14
src/click.c
14
src/click.c
|
@ -286,8 +286,18 @@ int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button_press_
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (con->layout == L_STACKED) {
|
||||
DLOG("stacked!\n");
|
||||
if (con->layout == L_STACKED || con->layout == L_TABBED) {
|
||||
DLOG("stacked! click is on %d, %d\n", event->event_x, event->event_y);
|
||||
Con *child;
|
||||
TAILQ_FOREACH(child, &(con->nodes_head), nodes) {
|
||||
if (!rect_contains(child->deco_rect, event->event_x, event->event_y))
|
||||
continue;
|
||||
|
||||
con_focus(child);
|
||||
break;
|
||||
}
|
||||
tree_render();
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
Loading…
Reference in New Issue