diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 204a2b6..ec9bdd7 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -98,6 +98,7 @@ static void       gtk_tooltip_display_closed       (GdkDisplay      *display,
 static void       gtk_tooltip_set_last_window      (GtkTooltip      *tooltip,
 						    GdkWindow       *window);
 
+static gboolean tooltip_is_active = FALSE;
 
 G_DEFINE_TYPE (GtkTooltip, gtk_tooltip, G_TYPE_OBJECT);
 
@@ -469,6 +470,7 @@ gtk_tooltip_trigger_tooltip_query (GdkDisplay *display)
     return;
 
   event.type = GDK_MOTION_NOTIFY;
+  event.any.send_event = TRUE;
   event.motion.window = window;
   event.motion.x = x;
   event.motion.y = y;
@@ -1073,6 +1075,9 @@ gtk_tooltip_show_tooltip (GdkDisplay *display)
     {
       gint tx, ty;
 
+      if (!tooltip_is_active)
+	return;
+
       window = tooltip->last_window;
 
       if (!GDK_IS_WINDOW (window))
@@ -1396,6 +1401,14 @@ _gtk_tooltip_handle_event (GdkEvent *event)
   if (!tooltips_enabled (event->any.window))
     return;
 
+  if (!event->any.send_event)
+    {
+      if (event->type == GDK_ENTER_NOTIFY || event->type == GDK_MOTION_NOTIFY)
+	tooltip_is_active = TRUE;
+      else if (event->type == GDK_LEAVE_NOTIFY)
+	tooltip_is_active = FALSE;
+    }
+
   /* Returns coordinates relative to has_tooltip_widget's allocation. */
   has_tooltip_widget = find_topmost_widget_coords_from_event (event, &x, &y);
   display = gdk_drawable_get_display (event->any.window);
