+static void
+handle_link_over_xy (EvView *view, gint x, gint y)
+{
+ EvLink *link;
+
+ link = get_link_at_location (view, x + view->scroll_x, y + view->scroll_y);
+
+ if (view->link_tooltip == NULL) {
+ view->link_tooltip = ev_tooltip_new (GTK_WIDGET (view));
+ }
+
+ if (view->hovered_link != link) {
+ view->hovered_link = link;
+ ev_tooltip_deactivate (EV_TOOLTIP (view->link_tooltip));
+ }
+
+ if (link) {
+ char *msg = tip_from_link (view, link);
+
+ ev_tooltip_set_position (EV_TOOLTIP (view->link_tooltip), x, y);
+ ev_tooltip_set_text (EV_TOOLTIP (view->link_tooltip), msg);
+ ev_tooltip_activate (EV_TOOLTIP (view->link_tooltip));
+ g_free (msg);
+
+ ev_view_set_cursor (view, EV_VIEW_CURSOR_LINK);
+ } else if (location_in_text (view, x + view->scroll_x, y + view->scroll_y)) {
+ ev_view_set_cursor (view, EV_VIEW_CURSOR_IBEAM);
+ } else {
+ ev_view_set_status (view, NULL);
+ if (view->cursor == EV_VIEW_CURSOR_LINK ||
+ view->cursor == EV_VIEW_CURSOR_IBEAM)
+ ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
+ }
+ return;
+}