summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-07-25 13:25:09 +0000
committerDana Jansens <danakj@orodu.net>2003-07-25 13:25:09 +0000
commit11cde9683d8d722d34c8b730d6bdd73fe73b080b (patch)
treed4df7981b9990ca12aadc7b9ade9eadd44f1e8b2 /openbox
parent399952e5478b270ad1b58fd25e14c808a9cfe26a (diff)
add client_search_transient which searches the tree from a client down for a client
Diffstat (limited to 'openbox')
-rw-r--r--openbox/client.c13
-rw-r--r--openbox/client.h2
2 files changed, 15 insertions, 0 deletions
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);