Bugfix: don’t focus dock clients (Thanks mseed, mist)

Fixes #321 and #323
This commit is contained in:
Michael Stapelberg 2011-03-03 13:59:42 +01:00
parent 33c2b4e582
commit e0647b7fc2
2 changed files with 12 additions and 0 deletions

View File

@ -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 to focus, either on the clicked window or its child if thas was a
* click into a child decoration */ * click into a child decoration */
con_focus((clicked_into ? clicked_into : con)); con_focus((clicked_into ? clicked_into : con));

View File

@ -181,6 +181,11 @@ int handle_enter_notify(void *ignored, xcb_connection_t *conn,
return 1; 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 */ /* 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; Con *child;