textview: skip the pointer lookup in buffers without tags
This commit is contained in:
parent
de8315084b
commit
95c0df3897
1 changed files with 5 additions and 0 deletions
|
|
@ -4187,6 +4187,11 @@ gtk_text_view_event (GtkWidget *widget, GdkEvent *event)
|
|||
if (event->any.window != text_view->text_window->bin_window)
|
||||
return FALSE;
|
||||
|
||||
/* Only tags get these events: without any, a motion of the pointer
|
||||
* needs no lookup of the character under it. */
|
||||
if (gtk_text_tag_table_get_size (gtk_text_buffer_get_tag_table (get_buffer (text_view))) == 0)
|
||||
return FALSE;
|
||||
|
||||
if (get_event_coordinates (event, &x, &y))
|
||||
{
|
||||
GtkTextIter iter;
|
||||
|
|
|
|||
Loading…
Reference in a new issue