Only send WM_TAKE_FOCUS when the client supports it in the protocols atom

Fixes launching xterm, for example
This commit is contained in:
Michael Stapelberg
2011-03-18 17:26:19 +01:00
parent 86117db434
commit 31da1eb0c1
5 changed files with 15 additions and 3 deletions

View File

@ -31,6 +31,12 @@ void client_remove_from_container(xcb_connection_t *conn, Client *client,
*/
void client_warp_pointer_into(xcb_connection_t *conn, Client *client);
/**
* Returns true if the client supports the given protocol atom (like WM_DELETE_WINDOW)
*
*/
bool client_supports_protocol(xcb_connection_t *conn, Client *client, xcb_atom_t atom);
/**
* Kills the given window using WM_DELETE_WINDOW or xcb_kill_window
*

View File

@ -444,6 +444,9 @@ struct Client {
* one. Therefore, this flag is set when reparenting. */
bool awaiting_useless_unmap;
/* Whether the client needs WM_TAKE_FOCUS */
bool needs_take_focus;
/* XCB contexts */
xcb_window_t frame; /**< Our window: The frame around the
* client */