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