client: allow selection of nofocus windows
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
2a882803ec
commit
2e345fbcda
4
client.c
4
client.c
|
@ -187,6 +187,7 @@ client_unfocus(client_t *c)
|
||||||
globalconf.screens[c->phys_screen].client_focus = NULL;
|
globalconf.screens[c->phys_screen].client_focus = NULL;
|
||||||
|
|
||||||
/* Set focus on root window, so no events leak to the current window. */
|
/* Set focus on root window, so no events leak to the current window. */
|
||||||
|
if (!c->nofocus)
|
||||||
xcb_set_input_focus(globalconf.connection, XCB_INPUT_FOCUS_POINTER_ROOT,
|
xcb_set_input_focus(globalconf.connection, XCB_INPUT_FOCUS_POINTER_ROOT,
|
||||||
root_win, XCB_CURRENT_TIME);
|
root_win, XCB_CURRENT_TIME);
|
||||||
|
|
||||||
|
@ -252,7 +253,7 @@ client_ban(client_t *c)
|
||||||
void
|
void
|
||||||
client_focus(client_t *c)
|
client_focus(client_t *c)
|
||||||
{
|
{
|
||||||
if(!client_maybevisible(c, c->screen) || c->nofocus)
|
if(!client_maybevisible(c, c->screen))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* unfocus current selected client */
|
/* unfocus current selected client */
|
||||||
|
@ -270,6 +271,7 @@ client_focus(client_t *c)
|
||||||
globalconf.screen_focus = &globalconf.screens[c->phys_screen];
|
globalconf.screen_focus = &globalconf.screens[c->phys_screen];
|
||||||
globalconf.screen_focus->client_focus = c;
|
globalconf.screen_focus->client_focus = c;
|
||||||
|
|
||||||
|
if (!c->nofocus)
|
||||||
xcb_set_input_focus(globalconf.connection, XCB_INPUT_FOCUS_POINTER_ROOT,
|
xcb_set_input_focus(globalconf.connection, XCB_INPUT_FOCUS_POINTER_ROOT,
|
||||||
c->win, XCB_CURRENT_TIME);
|
c->win, XCB_CURRENT_TIME);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue