Blame 0001-Resolves-rhbz-1719378-wrong-signature-for-GtkGesture.patch

7c103cd
From 58892b7ea04a0f336cee581b073d8d4348040fa8 Mon Sep 17 00:00:00 2001
7c103cd
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
7c103cd
Date: Tue, 11 Jun 2019 17:10:25 +0100
7c103cd
Subject: [PATCH] Resolves: rhbz#1719378 wrong signature for
7c103cd
 GtkGestureLongPress::pressed
7c103cd
7c103cd
Change-Id: Ib4c47189d5c9c89433f0c7de194ebb9777dc7bac
7c103cd
---
7c103cd
 vcl/inc/unx/gtk/gtkframe.hxx  |  2 +-
7c103cd
 vcl/unx/gtk3/gtk3gtkframe.cxx | 13 +++++--------
7c103cd
 2 files changed, 6 insertions(+), 9 deletions(-)
7c103cd
7c103cd
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
7c103cd
index f0d2bd96bc08..084339f96d70 100644
7c103cd
--- a/vcl/inc/unx/gtk/gtkframe.hxx
7c103cd
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
7c103cd
@@ -269,7 +269,7 @@ class GtkSalFrame : public SalFrame
7c103cd
                                           guint time, gpointer frame);
7c103cd
 
7c103cd
     static void         gestureSwipe(GtkGestureSwipe* gesture, gdouble velocity_x, gdouble velocity_y, gpointer frame);
7c103cd
-    static void         gestureLongPress(GtkGestureLongPress* gesture, gpointer frame);
7c103cd
+    static void         gestureLongPress(GtkGestureLongPress* gesture, gdouble x, gdouble y, gpointer frame);
7c103cd
 #else
7c103cd
     static gboolean     signalExpose( GtkWidget*, GdkEventExpose*, gpointer );
7c103cd
     void askForXEmbedFocus( sal_Int32 nTimecode );
7c103cd
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
7c103cd
index c180c077bd19..888a7fb9aeb4 100644
7c103cd
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
7c103cd
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
7c103cd
@@ -2739,17 +2739,14 @@ void GtkSalFrame::gestureSwipe(GtkGestureSwipe* gesture, gdouble velocity_x, gdo
7c103cd
     }
7c103cd
 }
7c103cd
 
7c103cd
-void GtkSalFrame::gestureLongPress(GtkGestureLongPress* gesture, gpointer frame)
7c103cd
+void GtkSalFrame::gestureLongPress(GtkGestureLongPress* gesture, gdouble x, gdouble y, gpointer frame)
7c103cd
 {
7c103cd
-    GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
7c103cd
-
7c103cd
-    if(pThis)
7c103cd
+    GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
7c103cd
+    if (gtk_gesture_get_point(GTK_GESTURE(gesture), sequence, &x, &y))
7c103cd
     {
7c103cd
-        SalLongPressEvent aEvent;
7c103cd
+        GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
7c103cd
 
7c103cd
-        gdouble x, y;
7c103cd
-        GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
7c103cd
-        gtk_gesture_get_point(GTK_GESTURE(gesture), sequence, &x, &y);
7c103cd
+        SalLongPressEvent aEvent;
7c103cd
         aEvent.mnX = x;
7c103cd
         aEvent.mnY = y;
7c103cd
 
7c103cd
-- 
7c103cd
2.20.1
7c103cd