[gtk+/wip/wayland-tablet-v2: 57/66] gtk: Add minimal handling of pad events



commit 63dff0924c56124d150865b245ed83dc9b1f2ef0
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 4 19:17:21 2016 +0200

    gtk: Add minimal handling of pad events
    
    No real handling is yet performed, to be done through a GdkEventController

 gtk/gtkmain.c   |    5 +++++
 gtk/gtkwidget.c |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index d0d91ef..ad6ed50 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1875,6 +1875,11 @@ gtk_main_do_event (GdkEvent *event)
     case GDK_TOUCH_CANCEL:
     case GDK_TOUCHPAD_SWIPE:
     case GDK_TOUCHPAD_PINCH:
+    case GDK_PAD_BUTTON_PRESS:
+    case GDK_PAD_BUTTON_RELEASE:
+    case GDK_PAD_RING:
+    case GDK_PAD_STRIP:
+    case GDK_PAD_GROUP_MODE:
       if (!_gtk_propagate_captured_event (grab_widget, event, topmost_widget))
         gtk_propagate_event (grab_widget, event);
       break;
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3bb621f..cbfb673 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7617,6 +7617,11 @@ gtk_widget_event_internal (GtkWidget *widget,
         case GDK_TOUCHPAD_PINCH:
           return_val |= _gtk_widget_run_controllers (widget, event, GTK_PHASE_BUBBLE);
           /* Fall through */
+        case GDK_PAD_BUTTON_PRESS:
+        case GDK_PAD_BUTTON_RELEASE:
+        case GDK_PAD_RING:
+        case GDK_PAD_STRIP:
+        case GDK_PAD_GROUP_MODE:
        case GDK_EXPOSE:
        case GDK_NOTHING:
          signal_num = -1;


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