From 4ddc94b293504b56c0106b0177c36c8efd2d3a57 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 9 Mar 2018 06:14:59 +0100 Subject: multipressgesture: Port to new API model --- gtk/gtkwindow.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gtk/gtkwindow.c') diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 0b090e323c..2e39cb0e2b 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1963,12 +1963,13 @@ gtk_window_constructed (GObject *object) if (priv->type == GTK_WINDOW_TOPLEVEL) { - priv->multipress_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (object)); + priv->multipress_gesture = gtk_gesture_multi_press_new (); gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->multipress_gesture), 0); gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->multipress_gesture), GTK_PHASE_NONE); g_signal_connect (priv->multipress_gesture, "pressed", G_CALLBACK (multipress_gesture_pressed_cb), object); + gtk_widget_add_controller (GTK_WIDGET (object), GTK_EVENT_CONTROLLER (priv->multipress_gesture)); priv->drag_gesture = gtk_gesture_drag_new (GTK_WIDGET (object)); gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->drag_gesture), @@ -5952,9 +5953,6 @@ gtk_window_finalize (GObject *object) priv->mnemonics_display_timeout_id = 0; } - if (priv->multipress_gesture) - g_object_unref (priv->multipress_gesture); - if (priv->drag_gesture) g_object_unref (priv->drag_gesture); -- cgit v1.2.1