[mutter/wip/wayland-display: 18/55] Add debug for synth events



commit 6eef32b41514ede81797cdb38191331e58c5245f
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 0002e91..8355118 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -1753,6 +1753,11 @@ meta_synthetize_key_event (MetaDisplay           *display,
   ClutterModifierType state;
   int i;
 
+  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]