# File gtk/sample/gtk-demo/hypertext.rb, line 156
    def set_cursor_if_appropriate(text_view, x, y)

      buffer = text_view.buffer
      iter = text_view.get_iter_at_location(x, y)

      hovering = false

      tags = iter.tags
      tags.each do |t|
        if t.page
          hovering = true
          break
        end
      end

      if hovering != @hovering
        @hovering = hovering

        window = text_view.get_window(Gtk::TextView::WINDOW_TEXT)

        window.cursor = if @hovering
                          @hand_cursor
                        else
                          @regular_cursor
                        end
      end
    end