[gtk/cursor-things: 2/3] text: Stop juggling cursors
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/cursor-things: 2/3] text: Stop juggling cursors
- Date: Thu, 18 Apr 2019 19:32:36 +0000 (UTC)
commit e37f4d0ea681bedb4f4573b4a6d0cdfe17684599
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Apr 18 15:06:35 2019 -0400
text: Stop juggling cursors
We have a convenience api for this.
gtk/gtktext.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 7666c78265..f93293a342 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]