diff options
author | William Hua <william.hua@canonical.com> | 2015-05-20 13:27:36 -0500 |
---|---|---|
committer | William Hua <william.hua@canonical.com> | 2015-06-02 15:14:27 -0400 |
commit | aebac40d3819114d55bf33301d30ff5a2fd6ad1a (patch) | |
tree | 85ca9c7ac3e6bf38fc67ba1d6f3743e533bd1278 /gdk/mir | |
parent | e6b3bae7871df3d5b03dae0e36e4748c41971d1b (diff) | |
download | gtk+-aebac40d3819114d55bf33301d30ff5a2fd6ad1a.tar.gz |
mir: log input events properly
Diffstat (limited to 'gdk/mir')
-rw-r--r-- | 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 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; |