From e7b4045ecea3b063bc8238172998ce5b1ed5bb97 Mon Sep 17 00:00:00 2001 From: okan Date: Sun, 28 Jun 2015 19:54:37 +0000 Subject: [PATCH] move client_find down --- client.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/client.c b/client.c index c4765af..2b4be67 100644 --- a/client.c +++ b/client.c @@ -42,21 +42,6 @@ static int client_inbound(struct client_ctx *, int, int); struct client_ctx *curcc = NULL; -struct client_ctx * -client_find(Window win) -{ - struct screen_ctx *sc; - struct client_ctx *cc; - - TAILQ_FOREACH(sc, &Screenq, entry) { - TAILQ_FOREACH(cc, &sc->clientq, entry) { - if (cc->win == win) - return(cc); - } - } - return(NULL); -} - struct client_ctx * client_init(Window win, struct screen_ctx *sc) { @@ -142,6 +127,21 @@ client_init(Window win, struct screen_ctx *sc) return(cc); } +struct client_ctx * +client_find(Window win) +{ + struct screen_ctx *sc; + struct client_ctx *cc; + + TAILQ_FOREACH(sc, &Screenq, entry) { + TAILQ_FOREACH(cc, &sc->clientq, entry) { + if (cc->win == win) + return(cc); + } + } + return(NULL); +} + void client_delete(struct client_ctx *cc) {