- while (c->transient_for && c->transient_for != TRAN_GROUP)
- c = c->transient_for;
-
- popup_show(focus_cycle_popup, (c->iconic ? c->icon_title : c->title),
- client_icon(c, 48, 48));
+ while (p->transient_for && p->transient_for != OB_TRAN_GROUP)
+ p = p->transient_for;
+
+ if (p == c)
+ title = NULL;
+ else
+ title = g_strconcat((c->iconic ? c->icon_title : c->title),
+ " - ",
+ (p->iconic ? p->icon_title : p->title),
+ NULL);
+
+ popup_show(focus_cycle_popup,
+ (title ? title : (c->iconic ? c->icon_title : c->title)),
+ client_icon(p, 48, 48));
+ g_free(title);