From aebac40d3819114d55bf33301d30ff5a2fd6ad1a Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 20 May 2015 13:27:36 -0500 Subject: mir: log input events properly --- gdk/mir/gdkmir-debug.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gdk/mir') diff --git a/gdk/mir/gdkmir-debug.c b/gdk/mir/gdkmir-debug.c index 9bfdfe7207..a135f1b283 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; -- cgit v1.2.1