[gtk+/wip/baedert/gtkimageview] GtkImageView: Ignore zoom-scroll when ctrl/shift are pressed
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gtkimageview] GtkImageView: Ignore zoom-scroll when ctrl/shift are pressed
- Date: Wed, 27 Jan 2016 17:49:12 +0000 (UTC)
commit d52b0bbdc0b04fb0ddde94bfb4bc9983e25d3cec
Author: Timm Bäder <mail baedert org>
Date: Wed Jan 27 18:48:53 2016 +0100
GtkImageView: Ignore zoom-scroll when ctrl/shift are pressed
gtk/gtkimageview.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkimageview.c b/gtk/gtkimageview.c
index 01ea2c8..39c3fb2 100644
--- a/gtk/gtkimageview.c
+++ b/gtk/gtkimageview.c
@@ -1470,7 +1470,8 @@ gtk_image_view_realize (GtkWidget *widget)
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_SMOOTH_SCROLL_MASK |
- GDK_SCROLL_MASK;
+ GDK_SCROLL_MASK |
+ GDK_TOUCH_MASK;
attributes.wclass = GDK_INPUT_ONLY;
window = gtk_widget_get_parent_window (widget);
@@ -1624,6 +1625,11 @@ gtk_image_view_scroll_event (GtkWidget *widget,
if (!priv->image_surface)
return GDK_EVENT_PROPAGATE;
+ if (event->state & GDK_SHIFT_MASK ||
+ event->state & GDK_CONTROL_MASK)
+ return GDK_EVENT_PROPAGATE;
+
+
gtk_image_view_get_current_state (image_view, &state);
gtk_image_view_set_scale_internal (image_view, new_scale);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]