summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2017-04-26 15:35:42 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2017-04-28 13:09:39 +0200
commit502e0a3a9e12f9bef19aee33fd975c58e5a713b5 (patch)
treee2157bb5547c8a6e50cc563b4e5a2d8dd61ac2ba
parentbbe53855419737915cfbd90bf91d785f7f1f48a8 (diff)
downloadgtk+-502e0a3a9e12f9bef19aee33fd975c58e5a713b5.tar.gz
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
-rw-r--r--gdk/wayland/gdkdevice-wayland.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 5a91301f0b..ddcba050b8 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;