Do nothing it the client already has focus

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-03-16 20:29:30 +01:00
parent 7743e71837
commit 0b6d6d738a
1 changed files with 3 additions and 0 deletions

View File

@ -193,6 +193,9 @@ client_focus(Client *c, int screen, Bool raise)
for(c = globalconf.clients; c && (c->skip || !client_isvisible(c, screen)); c = c->next); for(c = globalconf.clients; c && (c->skip || !client_isvisible(c, screen)); c = c->next);
} }
if(c == globalconf.focus->client)
return;
/* unfocus current selected client */ /* unfocus current selected client */
if(globalconf.focus->client) if(globalconf.focus->client)
client_unfocus(globalconf.focus->client); client_unfocus(globalconf.focus->client);