From fe43b99a2aa33060172608651e648efd65d7941b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 13 Oct 2009 17:28:40 +0200 Subject: [PATCH] client: remove prev_client_focus Not sure it's good however. Signed-off-by: Julien Danjou --- globalconf.h | 2 -- objects/client.c | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/globalconf.h b/globalconf.h index cd993f449..4ae07771f 100644 --- a/globalconf.h +++ b/globalconf.h @@ -80,8 +80,6 @@ typedef struct int keygrabber; /** The mouse pointer grabber function */ int mousegrabber; - /** Previously focused client */ - client_t *prev_client_focus; /** Focused client */ client_t *client_focus; /** Drawins */ diff --git a/objects/client.c b/objects/client.c index 8892dd94a..9d3f745ab 100644 --- a/objects/client.c +++ b/objects/client.c @@ -231,9 +231,6 @@ client_hasproto(client_t *c, xcb_atom_t atom) */ void client_ban_unfocus(client_t *c) { - if(globalconf.prev_client_focus == c) - globalconf.prev_client_focus = NULL; - /* Wait until the last moment to take away the focus from the window. */ if(globalconf.client_focus == c) client_unfocus(c); @@ -297,11 +294,7 @@ void client_focus_update(client_t *c) { if(!client_maybevisible(c, c->screen)) - { - /* Focus previously focused client */ - client_focus(globalconf.prev_client_focus); return; - } if(globalconf.client_focus) { @@ -312,7 +305,6 @@ client_focus_update(client_t *c) return; } - globalconf.prev_client_focus = c; globalconf.client_focus = c; /* according to EWMH, we have to remove the urgent state from a client */ @@ -952,9 +944,6 @@ client_unmanage(client_t *c, bool window_valid) tc->transient_for = NULL; } - if(globalconf.prev_client_focus == c) - globalconf.prev_client_focus = NULL; - if(globalconf.client_focus == c) client_unfocus(c);