+ if (curpos != NULL) {
+ gchar *text = NULL;
+ GList *it;
+
+ for (it = curpos->keylist; it; it = g_list_next(it)) {
+ gchar *oldtext = text;
+ if (text == NULL)
+ text = g_strdup(it->data);
+ else
+ text = g_strconcat(text, " - ", it->data, NULL);
+ g_free(oldtext);
+ }
+
+ popup_position(popup, NorthWestGravity, 10, 10);
+ if (popup->mapped) {
+ popup_show_timeout(text);
+ g_free(text);
+ } else {
+ ob_main_loop_timeout_remove(ob_main_loop, popup_show_timeout);
+ /* 1 second delay for the popup to show */
+ ob_main_loop_timeout_add(ob_main_loop, G_USEC_PER_SEC,
+ popup_show_timeout, text,
+ g_direct_equal, g_free);
+ }
+ } else {
+ popup_hide(popup);
+ ob_main_loop_timeout_remove(ob_main_loop, popup_show_timeout);
+ }