+
+GList* focus_cycle_popup_is_showing(ObClient *client)
+{
+ if (popup.mapped) {
+ GList *it;
+
+ for (it = popup.targets; it; it = g_list_next(it)) {
+ ObFocusCyclePopupTarget *t = it->data;
+ if (t->client == client)
+ return it;
+ }
+ }
+ return NULL;
+}
+
+ObClient* focus_cycle_popup_revert(ObClient *target)
+{
+ GList *it;
+
+ if (!popup.mapped) return NULL;
+
+ for (it = popup.targets; it; it = g_list_next(it)) {
+ ObFocusCyclePopupTarget *t = it->data;
+ if (t->client == target) {
+ if (it->prev)
+ return ((ObFocusCyclePopupTarget*)it->prev->data)->client;
+ else if (it->next)
+ return ((ObFocusCyclePopupTarget*)it->next->data)->client;
+ else
+ return NULL;
+ }
+ }
+ g_assert_not_reached();
+}
+
+void focus_cycle_popup_refresh(ObClient *target,
+ gboolean iconic_windows,
+ gboolean all_desktops,
+ gboolean dock_windows,
+ gboolean desktop_windows)
+{
+ if (!popup.mapped) return;
+
+ if (popup_setup(&popup, TRUE, TRUE, iconic_windows, all_desktops,
+ dock_windows, desktop_windows))
+ {
+ popup.mapped = FALSE;
+ popup_render(&popup, target);
+ XFlush(ob_display);
+ popup.mapped = TRUE;
+ }
+}