From: Dana Jansens Date: Fri, 25 Jul 2003 13:25:09 +0000 (+0000) Subject: add client_search_transient which searches the tree from a client down for a client X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=11cde9683d8d722d34c8b730d6bdd73fe73b080b;p=chaz%2Fopenbox add client_search_transient which searches the tree from a client down for a client --- diff --git a/openbox/client.c b/openbox/client.c index b31c939c..a961c149 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2635,3 +2635,16 @@ ObClient *client_search_top_transient(ObClient *self) return self; } + +ObClient *client_search_transient(ObClient *self, ObClient *search) +{ + GSList *sit; + + for (sit = self->transients; sit; sit = g_slist_next(sit)) { + if (sit->data == search) + return search; + if (client_search_transient(sit->data, search)) + return search; + } + return NULL; +} diff --git a/openbox/client.h b/openbox/client.h index c3bbe2b9..7001765f 100644 --- a/openbox/client.h +++ b/openbox/client.h @@ -431,6 +431,8 @@ ObClient *client_search_modal_child(ObClient *self); ObClient *client_search_top_transient(ObClient *self); +ObClient *client_search_transient(ObClient *self, ObClient *search); + /*! Return the "closest" client in the given direction */ ObClient *client_find_directional(ObClient *c, ObDirection dir);