[evince/gnome-3-30] zoom-action: Respond to icon touch events
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-30] zoom-action: Respond to icon touch events
- Date: Sat, 29 Sep 2018 20:16:51 +0000 (UTC)
commit 38a2437bd1be1b7011365d548c6a984fbad8a490
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 f1fd8c3c..c6ef0af3 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]