From: Michael Stapelberg Date: Thu, 3 Mar 2011 12:59:42 +0000 (+0100) Subject: Bugfix: don’t focus dock clients (Thanks mseed, mist) X-Git-Tag: tree-pr2~23 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0647b7fc2336c4f9e54eff6da6f7d2627232cc7;p=i3%2Fi3 Bugfix: don’t focus dock clients (Thanks mseed, mist) Fixes #321 and #323 --- diff --git a/src/click.c b/src/click.c index 8617cf0b..51472954 100644 --- a/src/click.c +++ b/src/click.c @@ -307,6 +307,13 @@ int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button_press_ } } + if ((clicked_into ? clicked_into->parent->type : con->parent->type) == CT_DOCKAREA) { + DLOG("Not handling, this client is inside a dockarea\n"); + xcb_allow_events(conn, XCB_ALLOW_REPLAY_POINTER, event->time); + xcb_flush(conn); + return 0; + } + /* click to focus, either on the clicked window or its child if thas was a * click into a child decoration */ con_focus((clicked_into ? clicked_into : con)); diff --git a/src/handlers.c b/src/handlers.c index 23e9c17a..35d8367a 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -181,6 +181,11 @@ int handle_enter_notify(void *ignored, xcb_connection_t *conn, return 1; } + if (con->parent->type == CT_DOCKAREA) { + DLOG("Ignoring, this is a dock client\n"); + return 1; + } + /* see if the user entered the window on a certain window decoration */ int layout = (enter_child ? con->parent->layout : con->layout); Con *child;