[gtk+/wip/carlosg/event-delivery: 26/104] gtktextview: Set "text" pointer cursor



commit ca07c111727e49e4b5f1cfcac1e6df8443a8b80a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Mar 31 18:02:16 2017 +0200

    gtktextview: Set "text" pointer cursor
    
    This is no longer set through the Gdkwindow, so use private GtkWidget
    API.

 gtk/gtktextview.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index a0f1ca1..c4565e3 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4710,6 +4710,7 @@ gtk_text_view_map (GtkWidget *widget)
 {
   GtkTextView *text_view;
   GtkTextViewPrivate *priv;
+  GdkCursor *cursor;
 
   text_view = GTK_TEXT_VIEW (widget);
   priv = text_view->priv;
@@ -4728,6 +4729,10 @@ gtk_text_view_map (GtkWidget *widget)
   if (priv->bottom_window)
     text_window_map (priv->bottom_window);
 
+  cursor = gdk_cursor_new_from_name (gtk_widget_get_display (widget), "text");
+  gtk_widget_set_cursor (widget, cursor);
+  g_object_unref (cursor);
+
   GTK_WIDGET_CLASS (gtk_text_view_parent_class)->map (widget);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]