end tooltip timeout and display for relevant leave notify events

This commit is contained in:
Paul Davis 2014-09-26 17:06:38 -04:00
parent df5a188825
commit 2a53154892

View file

@ -890,6 +890,17 @@ GtkCanvas::on_enter_notify_event (GdkEventCrossing* ev)
bool
GtkCanvas::on_leave_notify_event (GdkEventCrossing* ev)
{
switch (ev->detail) {
case GDK_NOTIFY_ANCESTOR:
case GDK_NOTIFY_UNKNOWN:
case GDK_NOTIFY_VIRTUAL:
case GDK_NOTIFY_NONLINEAR:
case GDK_NOTIFY_NONLINEAR_VIRTUAL:
/* leaving window, cancel any tooltips */
stop_tooltip_timeout ();
hide_tooltip ();
break;
}
_new_current_item = 0;
deliver_enter_leave (Duple (ev->x, ev->y), ev->state);
return true;