[gtk+/wip/mir-unstable: 4/6] mir: log input events properly



commit ad11c987827ed2b31847b9c8f0754ad78683feb7
Author: William Hua <william hua canonical com>
Date:   Wed May 20 13:27:36 2015 -0500

    mir: log input events properly

 gdk/mir/gdkmir-debug.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/gdk/mir/gdkmir-debug.c b/gdk/mir/gdkmir-debug.c
index 9bfdfe7..a135f1b 100644
--- a/gdk/mir/gdkmir-debug.c
+++ b/gdk/mir/gdkmir-debug.c
@@ -184,8 +184,26 @@ _gdk_mir_print_close_event (const MirCloseSurfaceEvent *event)
 void
 _gdk_mir_print_event (const MirEvent *event)
 {
+  const MirInputEvent *input_event;
+
   switch (mir_event_get_type (event))
     {
+    case mir_event_type_input:
+      input_event = mir_event_get_input_event (event);
+
+      switch (mir_input_event_get_type (input_event))
+        {
+          case mir_input_event_type_key:
+            _gdk_mir_print_key_event (mir_event_get_input_event (event));
+            break;
+          case mir_input_event_type_touch:
+            _gdk_mir_print_motion_event (mir_event_get_input_event (event));
+            break;
+          case mir_input_event_type_pointer:
+            _gdk_mir_print_motion_event (mir_event_get_input_event (event));
+            break;
+        }
+      break;
     case mir_event_type_key:
       _gdk_mir_print_key_event (mir_event_get_input_event (event));
       break;


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