diff --git a/src/handlers.c b/src/handlers.c index 68fba0c4..8a84f335 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -148,18 +148,15 @@ static void handle_enter_notify(xcb_enter_notify_event_t *event) { enter_child = true; } - /* If not, then the user moved their cursor to the root window. In that case, we adjust c_ws */ - if (con == NULL) { + /* If we cannot find the container, the user moved their cursor to the root + * window. In this case and if they used it to a dock, we need to focus the + * workspace on the correct output. */ + if (con == NULL || con->parent->type == CT_DOCKAREA) { DLOG("Getting screen at %d x %d\n", event->root_x, event->root_y); check_crossing_screen_boundary(event->root_x, event->root_y); return; } - if (con->parent->type == CT_DOCKAREA) { - DLOG("Ignoring, this is a dock client\n"); - return; - } - /* see if the user entered the window on a certain window decoration */ layout_t layout = (enter_child ? con->parent->layout : con->layout); if (layout == L_DEFAULT) {