X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fhandlers.c;h=c63f236c1c8510571d82dd824c257f578ac6fa1f;hb=b0e871e0cfdc35f2147c4497136c5b74c9ebafe7;hp=fbd660bc6946803a6acdd6e41a0568c004c54570;hpb=3721bcb86865f9a269d1d655ff2c99e6afd3f676;p=i3%2Fi3 diff --git a/src/handlers.c b/src/handlers.c index fbd660bc..c63f236c 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -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 */ int layout = (enter_child ? con->parent->layout : con->layout); - Con *child; - TAILQ_FOREACH(child, &(con->nodes_head), nodes) - if (rect_contains(child->deco_rect, event->event_x, event->event_y)) { - LOG("using child %p / %s instead!\n", child, child->name); - 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 (layout == L_DEFAULT) { + Con *child; + TAILQ_FOREACH(child, &(con->nodes_head), nodes) + if (rect_contains(child->deco_rect, event->event_x, event->event_y)) { + LOG("using child %p / %s instead!\n", child, child->name); + con = child; + break; + } } #if 0 @@ -813,7 +808,13 @@ static int handle_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_w //CLIENT_LOG(con); LOG("Urgency flag changed to %d\n", con->urgent); - workspace_update_urgent_flag(con_get_workspace(con)); + Con *ws; + /* Set the urgency flag on the workspace, if a workspace could be found + * (for dock clients, that is not the case). */ + if ((ws = con_get_workspace(con)) != NULL) + workspace_update_urgent_flag(ws); + + tree_render(); #if 0 /* If the workspace this client is on is not visible, we need to redraw