Commit 9cc1f6c0 authored by Jason Crain's avatar Jason Crain Committed by Germán Poo-Caamaño

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
parent 9a3ce54d
...@@ -259,10 +259,13 @@ get_popup (EvZoomAction *zoom_action) ...@@ -259,10 +259,13 @@ get_popup (EvZoomAction *zoom_action)
static void static void
entry_icon_press_callback (GtkEntry *entry, entry_icon_press_callback (GtkEntry *entry,
GtkEntryIconPosition icon_pos, GtkEntryIconPosition icon_pos,
GdkEventButton *event, GdkEvent *event,
EvZoomAction *zoom_action) EvZoomAction *zoom_action)
{ {
if (event->button != GDK_BUTTON_PRIMARY) guint button = 0;
if (gdk_event_get_button (event, &button) &&
button != GDK_BUTTON_PRIMARY)
return; return;
gtk_popover_popup (get_popup (zoom_action)); gtk_popover_popup (get_popup (zoom_action));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment