[mutter/wip/wayland-2: 15/15] Add debug for synth events



commit 76a64cbcff5d39830dfd936f6e8dbf81afbaf34d
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Jul 17 11:11:58 2013 +0200

    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 deletions(-)
---
diff --git a/src/core/util.c b/src/core/util.c
index b37cc00..2426fb8 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 c0252bb..d2eb290 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 d0a13e0..1e90b0d 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 */


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