+ parse_register(i, "placement", parse_xml, NULL);
+}
+
+static Rect* pick_head(ObClient *c)
+{
+ /* try direct parent first */
+ if (c->transient_for && c->transient_for != OB_TRAN_GROUP) {
+ return screen_area_monitor(c->desktop,
+ client_monitor(c->transient_for));
+ }
+
+ /* more than one guy in his group (more than just him) */
+ if (c->group && c->group->members->next) {
+ GSList *it;
+
+ /* try on the client's desktop */
+ for (it = c->group->members; it; it = g_slist_next(it)) {
+ ObClient *itc = it->data;
+ if (itc != c &&
+ (itc->desktop == c->desktop ||
+ itc->desktop == DESKTOP_ALL || c->desktop == DESKTOP_ALL))
+ return screen_area_monitor(c->desktop,
+ client_monitor(it->data));
+ }
+
+ /* try on all desktops */
+ for (it = c->group->members; it; it = g_slist_next(it)) {
+ ObClient *itc = it->data;
+ if (itc != c)
+ return screen_area_monitor(c->desktop,
+ client_monitor(it->data));
+ }
+ }
+
+ return NULL;