summaryrefslogtreecommitdiff
path: root/gtk/gtktextview.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r--gtk/gtktextview.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index c50fe411f7..49b47a38e6 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1678,13 +1678,14 @@ gtk_text_view_init (GtkTextView *text_view)
widget);
gtk_widget_add_controller (widget, GTK_EVENT_CONTROLLER (gesture));
- priv->drag_gesture = gtk_gesture_drag_new (widget);
+ priv->drag_gesture = gtk_gesture_drag_new ();
g_signal_connect (priv->drag_gesture, "drag-update",
G_CALLBACK (gtk_text_view_drag_gesture_update),
widget);
g_signal_connect (priv->drag_gesture, "drag-end",
G_CALLBACK (gtk_text_view_drag_gesture_end),
widget);
+ gtk_widget_add_controller (widget, GTK_EVENT_CONTROLLER (priv->drag_gesture));
priv->motion_controller = gtk_event_controller_motion_new (widget);
g_signal_connect (priv->motion_controller, "motion", G_CALLBACK (gtk_text_view_motion), widget);
@@ -3600,7 +3601,6 @@ gtk_text_view_finalize (GObject *object)
cancel_pending_scroll (text_view);
- g_object_unref (priv->drag_gesture);
g_object_unref (priv->motion_controller);
g_object_unref (priv->key_controller);