Blob Blame History Raw
diff -up krb5-auth-dialog-0.8/src/krb5-auth-notify.c.panel-settle krb5-auth-dialog-0.8/src/krb5-auth-notify.c
--- krb5-auth-dialog-0.8/src/krb5-auth-notify.c.panel-settle	2009-01-11 16:46:19.000000000 -0500
+++ krb5-auth-dialog-0.8/src/krb5-auth-notify.c	2009-04-23 14:09:29.536749401 -0400
@@ -24,6 +24,19 @@
 #ifdef HAVE_LIBNOTIFY
 #include <libnotify/notify.h>
 
+static gboolean
+show_notification (Krb5AuthApplet *applet)
+{
+        /* wait for the panel to be settled before showing a bubble */
+        if (gtk_status_icon_is_embedded (applet->tray_icon)) {
+                notify_notification_show (applet->notification, NULL);
+        }
+        else {
+                g_timeout_add_seconds (5, (GSourceFunc)show_notification, applet);
+        }
+        return FALSE;
+}
+
 void
 ka_send_event_notification (Krb5AuthApplet *applet,
 			    const char *summary,
@@ -50,7 +63,7 @@ ka_send_event_notification (Krb5AuthAppl
 		notify_notification_new_with_status_icon(summary, message, notify_icon, applet->tray_icon);
 
         notify_notification_set_urgency (applet->notification, NOTIFY_URGENCY_NORMAL);
-        notify_notification_show (applet->notification, NULL);
+        show_notification (applet);
 }
 
 #else /* HAVE_LIBNOTIFY */