--- xchat-gnome-0.26.1+git20101206.557c940.orig/plugins/notification/notification.c	2010-12-16 19:16:47.000000000 -0700
+++ xchat-gnome-0.26.1+git20101206.557c940/plugins/notification/notification.c	2011-04-09 09:48:33.000000000 -0600
@@ -175,6 +175,14 @@
 	update_tray ();
 }
 
+static int
+main_close_cb (char *word[], gpointer data) {
+  fprintf(stderr, "In  notification close callback, suppressing close event (hopefully)\n");
+  fprintf(stderr, "level: %d status: %d\n", level, status);
+  xchat_command (ph, "GUI HIDE");  
+  return XCHAT_EAT_XCHAT;
+}
+
 /*** xchat plugin functions ***/
 int
 xchat_plugin_init (xchat_plugin * plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
@@ -208,6 +216,8 @@
 	xchat_hook_print (ph, "Channel Msg Hilight",		XCHAT_PRI_NORM, new_msg_cb, GUINT_TO_POINTER (NOTIF_NICK));
 	xchat_hook_print (ph, "Channel Action Hilight",		XCHAT_PRI_NORM, new_msg_cb, GUINT_TO_POINTER (NOTIF_NICK));
 	xchat_hook_print (ph, "Private Message to Dialog",	XCHAT_PRI_NORM, new_msg_cb, GUINT_TO_POINTER (NOTIF_NICK));
+	xchat_hook_print (ph, "Close Main", XCHAT_PRI_NORM, main_close_cb, NULL);
+
 	gconf_notify_id = gconf_client_notify_add (client, "/apps/xchat/plugins/notification/level", (GConfClientNotifyFunc) level_changed, NULL, NULL, NULL);
 	g_object_unref (client);
 
