[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara caolanm at redhat.com
Wed Aug 5 12:30:56 PDT 2015


 vcl/unx/gtk/window/gtksalframe.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 848f685ae8f614ad62d205ef628f259cafb738b3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 5 20:03:18 2015 +0100

    attach gestures to event widget instead of toplevel
    
    Change-Id: Id0658cf561570a2ae15fb7fd603e6437da9cfaf2

diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 1db20e5..f1abaa8 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -1085,15 +1085,15 @@ void GtkSalFrame::InitCommon()
     g_signal_connect( G_OBJECT(m_pFixedContainer), "draw", G_CALLBACK(signalDraw), this );
 //    g_signal_connect( G_OBJECT(m_pWindow), "state-flags-changed", G_CALLBACK(signalFlagsChanged), this );
 #if GTK_CHECK_VERSION(3,14,0)
-    GtkGesture *pSwipe = gtk_gesture_swipe_new(m_pWindow);
+    GtkGesture *pSwipe = gtk_gesture_swipe_new(pEventWidget);
     g_signal_connect(pSwipe, "swipe", G_CALLBACK(gestureSwipe), this);
     gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER (pSwipe), GTK_PHASE_TARGET);
-    g_object_weak_ref(G_OBJECT(m_pWindow), reinterpret_cast<GWeakNotify>(g_object_unref), pSwipe);
+    g_object_weak_ref(G_OBJECT(pEventWidget), reinterpret_cast<GWeakNotify>(g_object_unref), pSwipe);
 
-    GtkGesture *pLongPress = gtk_gesture_long_press_new(m_pWindow);
+    GtkGesture *pLongPress = gtk_gesture_long_press_new(pEventWidget);
     g_signal_connect(pLongPress, "pressed", G_CALLBACK(gestureLongPress), this);
     gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER (pLongPress), GTK_PHASE_TARGET);
-    g_object_weak_ref(G_OBJECT(m_pWindow), reinterpret_cast<GWeakNotify>(g_object_unref), pLongPress);
+    g_object_weak_ref(G_OBJECT(pEventWidget), reinterpret_cast<GWeakNotify>(g_object_unref), pLongPress);
 
 #endif
 


More information about the Libreoffice-commits mailing list