client: support input focus hints
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
b44a1fea35
commit
506a4200c6
4
client.c
4
client.c
|
@ -252,7 +252,7 @@ client_ban(client_t *c)
|
||||||
static void
|
static void
|
||||||
client_focus(client_t *c)
|
client_focus(client_t *c)
|
||||||
{
|
{
|
||||||
if(!client_maybevisible(c, c->screen))
|
if(!client_maybevisible(c, c->screen) || c->nofocus)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* unfocus current selected client */
|
/* unfocus current selected client */
|
||||||
|
@ -855,6 +855,8 @@ client_updatewmhints(client_t *c)
|
||||||
if((wmh.flags & XCB_WM_HINT_STATE) &&
|
if((wmh.flags & XCB_WM_HINT_STATE) &&
|
||||||
wmh.initial_state == XCB_WM_STATE_WITHDRAWN)
|
wmh.initial_state == XCB_WM_STATE_WITHDRAWN)
|
||||||
client_setborder(c, 0);
|
client_setborder(c, 0);
|
||||||
|
|
||||||
|
c->nofocus = !wmh.input;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -306,6 +306,8 @@ struct client_t
|
||||||
bool isontop;
|
bool isontop;
|
||||||
/** true if the client must be skipped from task bar client list */
|
/** true if the client must be skipped from task bar client list */
|
||||||
bool skiptb;
|
bool skiptb;
|
||||||
|
/** True if the client cannot have focus */
|
||||||
|
bool nofocus;
|
||||||
/** The window type */
|
/** The window type */
|
||||||
window_type_t type;
|
window_type_t type;
|
||||||
/** Window of the client */
|
/** Window of the client */
|
||||||
|
|
Loading…
Reference in New Issue