From 76a64cbcff5d39830dfd936f6e8dbf81afbaf34d Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 17 Jul 2013 11:11:58 +0200 Subject: Add debug for synth events So we can see what Clutter is doing, and why we are not getting the correct modifier state... --- src/core/util.c | 2 ++ src/meta/util.h | 3 ++- src/wayland/meta-wayland.c | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/util.c b/src/core/util.c index b37cc000f..2426fb83d 100644 --- a/src/core/util.c +++ b/src/core/util.c @@ -345,6 +345,8 @@ topic_name (MetaDebugTopic topic) return "COMPOSITOR"; case META_DEBUG_EDGE_RESISTANCE: return "EDGE_RESISTANCE"; + case META_DEBUG_SYNTH_EVENTS: + return "SYNTH_EVENTS"; case META_DEBUG_VERBOSE: return "VERBOSE"; } diff --git a/src/meta/util.h b/src/meta/util.h index c0252bb11..d2eb2906b 100644 --- a/src/meta/util.h +++ b/src/meta/util.h @@ -102,7 +102,8 @@ typedef enum META_DEBUG_RESIZING = 1 << 18, META_DEBUG_SHAPES = 1 << 19, META_DEBUG_COMPOSITOR = 1 << 20, - META_DEBUG_EDGE_RESISTANCE = 1 << 21 + META_DEBUG_EDGE_RESISTANCE = 1 << 21, + META_DEBUG_SYNTH_EVENTS = 1 << 22, } MetaDebugTopic; void meta_topic_real (MetaDebugTopic topic, diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index d0a13e00c..1e90b0ded 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -1737,6 +1737,11 @@ meta_synthetize_key_event (MetaDisplay *display, XGenericEventCookie cookie; XIDeviceEvent xievent; + meta_topic (META_DEBUG_SYNTH_EVENTS, + "seen key event from Clutter (sym: %d, code: %d, mods: %d)\n", + clutter_event_get_key_symbol (event), clutter_event_get_key_code (event), + clutter_event_get_state (event)); + /* I think in real XLib cookie and xievent share some of the underlying memory (that would explain why the first fields are the same), but I'm not sure and I don't care */ -- cgit v1.2.1