text: Stop juggling cursors

We have a convenience api for this.
This commit is contained in:
Matthias Clasen 2019-04-18 15:06:35 -04:00
parent b26087845d
commit e37f4d0ea6

View File

@ -2856,14 +2856,11 @@ static void
gtk_text_obscure_mouse_cursor (GtkText *self)
{
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
GdkCursor *cursor;
if (priv->mouse_cursor_obscured)
return;
cursor = gdk_cursor_new_from_name ("none", NULL);
gtk_widget_set_cursor (GTK_WIDGET (self), cursor);
g_object_unref (cursor);
gtk_widget_set_cursor_from_name (GTK_WIDGET (self), "none");
priv->mouse_cursor_obscured = TRUE;
}