Only send WM_TAKE_FOCUS when the client supports it in the protocols atom
Fixes opening xterm, for example
This commit is contained in:
@ -246,6 +246,9 @@ struct Window {
|
||||
/** Whether the application used _NET_WM_NAME */
|
||||
bool uses_net_wm_name;
|
||||
|
||||
/** Whether the application needs to receive WM_TAKE_FOCUS */
|
||||
bool needs_take_focus;
|
||||
|
||||
/** Whether the window says it is a dock window */
|
||||
enum { W_NODOCK = 0, W_DOCK_TOP = 1, W_DOCK_BOTTOM = 2 } dock;
|
||||
|
||||
|
@ -39,6 +39,12 @@ void x_reinit(Con *con);
|
||||
*/
|
||||
void x_con_kill(Con *con);
|
||||
|
||||
/**
|
||||
* Returns true if the client supports the given protocol atom (like WM_DELETE_WINDOW)
|
||||
*
|
||||
*/
|
||||
bool window_supports_protocol(xcb_window_t window, xcb_atom_t atom);
|
||||
|
||||
/**
|
||||
* Kills the given X11 window using WM_DELETE_WINDOW (if supported).
|
||||
*
|
||||
|
@ -116,6 +116,12 @@ void fake_configure_notify(xcb_connection_t *conn, Rect r, xcb_window_t window);
|
||||
*/
|
||||
void fake_absolute_configure_notify(Con *con);
|
||||
|
||||
/**
|
||||
* Sends the WM_TAKE_FOCUS ClientMessage to the given window
|
||||
*
|
||||
*/
|
||||
void send_take_focus(xcb_window_t window);
|
||||
|
||||
/**
|
||||
* Finds out which modifier mask is the one for numlock, as the user may
|
||||
* change this.
|
||||
|
Reference in New Issue
Block a user