client: support input focus hints

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-09-03 16:51:46 +02:00
parent b44a1fea35
commit 506a4200c6
2 changed files with 5 additions and 1 deletions

View File

@ -252,7 +252,7 @@ client_ban(client_t *c)
static void
client_focus(client_t *c)
{
if(!client_maybevisible(c, c->screen))
if(!client_maybevisible(c, c->screen) || c->nofocus)
return;
/* unfocus current selected client */
@ -855,6 +855,8 @@ client_updatewmhints(client_t *c)
if((wmh.flags & XCB_WM_HINT_STATE) &&
wmh.initial_state == XCB_WM_STATE_WITHDRAWN)
client_setborder(c, 0);
c->nofocus = !wmh.input;
}
}

View File

@ -306,6 +306,8 @@ struct client_t
bool isontop;
/** true if the client must be skipped from task bar client list */
bool skiptb;
/** True if the client cannot have focus */
bool nofocus;
/** The window type */
window_type_t type;
/** Window of the client */