summaryrefslogtreecommitdiff
path: root/examples/drawing.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/drawing.c')
-rw-r--r--examples/drawing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/drawing.c b/examples/drawing.c
index 7bf1bb688e..0713b81611 100644
--- a/examples/drawing.c
+++ b/examples/drawing.c
@@ -165,9 +165,9 @@ activate (GtkApplication *app,
g_signal_connect (drag, "drag-update", G_CALLBACK (drag_update), drawing_area);
g_signal_connect (drag, "drag-end", G_CALLBACK (drag_end), drawing_area);
- press = gtk_gesture_multi_press_new (drawing_area);
+ press = gtk_gesture_multi_press_new ();
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (press), GDK_BUTTON_SECONDARY);
- g_object_set_data_full (G_OBJECT (drawing_area), "press", press, g_object_unref);
+ gtk_widget_add_controller (drawing_area, GTK_EVENT_CONTROLLER (press));
g_signal_connect (press, "pressed", G_CALLBACK (pressed), drawing_area);