diff options
author | Giovanni Campagna <gcampagn@redhat.com> | 2013-07-17 11:11:58 +0200 |
---|---|---|
committer | Giovanni Campagna <gcampagn@redhat.com> | 2013-07-17 15:14:48 +0200 |
commit | 76a64cbcff5d39830dfd936f6e8dbf81afbaf34d (patch) | |
tree | 942e24c2a0fdba6d4e45d8c5cd42d3f4ac17c6f5 | |
parent | f01c99a6d8c0fb6fb28544fe5498adc231e8c178 (diff) | |
download | mutter-wip/wayland-2.tar.gz |
Add debug for synth eventswip/wayland-2
So we can see what Clutter is doing, and why we are not
getting the correct modifier state...
-rw-r--r-- | src/core/util.c | 2 | ||||
-rw-r--r-- | src/meta/util.h | 3 | ||||
-rw-r--r-- | src/wayland/meta-wayland.c | 5 |
3 files changed, 9 insertions, 1 deletions
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 */ |