Hide tooltip when leaving sheet
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 16 Apr 2009 13:26:57 +0000 (21:26 +0800)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 16 Apr 2009 13:26:57 +0000 (21:26 +0800)
lib/gtk-contrib/psppire-sheet.c

index 9442f260750f24874d6c199aee0c048e0ecfcd96..6fb9a7a3c604d015989176fd32a4d8ee85e7ba40 100644 (file)
@@ -3753,7 +3753,8 @@ create_hover_window (void)
 #define HOVER_WINDOW_Y_OFFSET 2
 
 static void
-show_subtitle (PsppireSheet *sheet, gint row, gint column, const gchar *subtitle)
+show_subtitle (PsppireSheet *sheet, gint row, gint column,
+              const gchar *subtitle)
 {
   gint x, y;
   gint px, py;
@@ -4124,6 +4125,9 @@ psppire_sheet_crossing_notify (GtkWidget *widget,
   else if (event->window == sheet->row_title_window)
     sheet->row_title_under = event->type == GDK_ENTER_NOTIFY;
 
+  if (event->type == GDK_LEAVE_NOTIFY)
+    gtk_widget_hide (sheet->hover_window->window);
+
   return TRUE;
 }