[evince/gnome-3-28] zoom-action: Respond to icon touch events



commit f665a30ac278c51573c7200eb91ded87f71bac83
Author: Jason Crain <jcrain src gnome org>
Date:   Fri Sep 28 09:39:24 2018 -0600

    zoom-action: Respond to icon touch events
    
    The zoom entry is filtering out touch events because it assumes that it
    will only handle button events. It assumes it will only receive
    GdkEventButton events and ignores the touch event because the miscast
    data structure doesn't look like it's for the primary mouse button. Fix
    the function signature and only filter by the button type if this is a
    button event.
    
    Fixes #976

 shell/ev-zoom-action.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/shell/ev-zoom-action.c b/shell/ev-zoom-action.c
index af2482cd..9a32477f 100644
--- a/shell/ev-zoom-action.c
+++ b/shell/ev-zoom-action.c
@@ -259,10 +259,13 @@ get_popup (EvZoomAction *zoom_action)
 static void
 entry_icon_press_callback (GtkEntry            *entry,
                            GtkEntryIconPosition icon_pos,
-                           GdkEventButton      *event,
+                           GdkEvent            *event,
                            EvZoomAction        *zoom_action)
 {
-        if (event->button != GDK_BUTTON_PRIMARY)
+        guint button = 0;
+
+        if (gdk_event_get_button (event, &button) &&
+            button != GDK_BUTTON_PRIMARY)
                 return;
 
         gtk_popover_popup (get_popup (zoom_action));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]