[gtk+] wayland: make key event log more explicit



commit 502e0a3a9e12f9bef19aee33fd975c58e5a713b5
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Apr 26 15:35:42 2017 +0200

    wayland: make key event log more explicit
    
    With Wayland, GDK_DEBUG=events would log key events but not explicitly
    state whether the event is a key press or release, or if it's
    originating from a key repeat.
    
    Add some more verbosity to make sure these informations are logged on
    key delivery when GDK_DEBUG is set.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781767

 gdk/wayland/gdkdevice-wayland.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 5a91301..ddcba05 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -2125,10 +2125,13 @@ deliver_key_event (GdkWaylandSeat *seat,
   _gdk_wayland_display_deliver_event (seat->display, event);
 
   GDK_NOTE (EVENTS,
-            g_message ("keyboard event, code %d, sym %d, "
-                       "string %s, mods 0x%x",
+            g_message ("keyboard %s event%s, code %d, sym %d, "
+                       "string %s, mods 0x%x, with %i key%s pressed",
+                       (state ? "press" : "release"),
+                       (from_key_repeat ? " (repeat)" : ""),
                        event->key.hardware_keycode, event->key.keyval,
-                       event->key.string, event->key.state));
+                       event->key.string, event->key.state,
+                       seat->nkeys, (seat->nkeys > 1 ? "s" : "")));
 
   if (!xkb_keymap_key_repeats (xkb_keymap, key))
     return;


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