Bugfix: Fix focus follows mouse for non-default layout cons (Thanks phnom)
Fixes: #361
This commit is contained in:
parent
15c288f7d7
commit
b0e871e0cf
|
@ -184,19 +184,14 @@ static int handle_enter_notify(xcb_enter_notify_event_t *event) {
|
||||||
|
|
||||||
/* see if the user entered the window on a certain window decoration */
|
/* see if the user entered the window on a certain window decoration */
|
||||||
int layout = (enter_child ? con->parent->layout : con->layout);
|
int layout = (enter_child ? con->parent->layout : con->layout);
|
||||||
Con *child;
|
if (layout == L_DEFAULT) {
|
||||||
TAILQ_FOREACH(child, &(con->nodes_head), nodes)
|
Con *child;
|
||||||
if (rect_contains(child->deco_rect, event->event_x, event->event_y)) {
|
TAILQ_FOREACH(child, &(con->nodes_head), nodes)
|
||||||
LOG("using child %p / %s instead!\n", child, child->name);
|
if (rect_contains(child->deco_rect, event->event_x, event->event_y)) {
|
||||||
con = child;
|
LOG("using child %p / %s instead!\n", child, child->name);
|
||||||
break;
|
con = child;
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
/* for stacked/tabbed layout we do not want to change focus when the user
|
|
||||||
* enters the window at the decoration of any child window. */
|
|
||||||
if (layout == L_STACKED || layout == L_TABBED) {
|
|
||||||
con = TAILQ_FIRST(&(con->parent->focus_head));
|
|
||||||
LOG("using focused %p / %s instead\n", con, con->name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Reference in New Issue