- if (!show) {
- popup_hide(focus_cycle_popup);
- } else {
- Rect *a;
- Client *p = c;
- char *title;
-
- a = screen_area(c->desktop);
- popup_position(focus_cycle_popup, CenterGravity,
- a->x + a->width / 2, a->y + a->height / 2);
-/* popup_size(focus_cycle_popup, a->height/2, a->height/16);
- popup_show(focus_cycle_popup, c->title,
- client_icon(c, a->height/16, a->height/16));
-*/
- /* XXX the size and the font extents need to be related on some level
- */
- popup_size(focus_cycle_popup, 320, 48);
-
- /* use the transient's parent's title/icon */
- while (p->transient_for && p->transient_for != TRAN_GROUP)
- p = p->transient_for;
-
- if (p == c)
- title = NULL;
- else
- title = g_strconcat((p->iconic ? p->icon_title : p->title),
- " - ",
- (c->iconic ? c->icon_title : c->title),
- NULL);
-
- popup_show(focus_cycle_popup,
- (title ? title : (c->iconic ? c->icon_title : c->title)),
- client_icon(p, 48, 48));
- g_free(title);
- }
+ ObClient *new;
+
+ /* unfocus any focused clients.. they can be focused by Pointer events
+ and such, and then when we try focus them, we won't get a FocusIn
+ event at all for them. */
+ focus_nothing();
+
+ new = focus_fallback_target(allow_refocus);
+
+ return new;