diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-10-27 10:08:09 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-10-27 10:08:09 -0700 |
commit | 0b17d4e57d2a75f2a0bd3450ade98ecc3dac8311 (patch) | |
tree | b72b59e0e591cce8dab900509a848a4da8a91a80 /platform/linuxbsd | |
parent | 24fdedfe948a918b5a67846f7962f83ba0e59258 (diff) |
Add KeyPress & KeyRelease events to X11 debug events logging
Compiled out by default, just used for debugging local builds.
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r-- | platform/linuxbsd/display_server_x11.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp index 212b6762e1..16baffdbcc 100644 --- a/platform/linuxbsd/display_server_x11.cpp +++ b/platform/linuxbsd/display_server_x11.cpp @@ -3367,11 +3367,18 @@ void DisplayServerX11::process_events() { } break; case KeyPress: case KeyRelease: { +#ifdef DISPLAY_SERVER_X11_DEBUG_LOGS_ENABLED + if (event.type == KeyPress) { + DEBUG_LOG_X11("[%u] KeyPress window=%lu (%u), keycode=%u, time=%lu \n", frame, event.xkey.window, window_id, event.xkey.keycode, event.xkey.time); + } else { + DEBUG_LOG_X11("[%u] KeyRelease window=%lu (%u), keycode=%u, time=%lu \n", frame, event.xkey.window, window_id, event.xkey.keycode, event.xkey.time); + } +#endif last_timestamp = event.xkey.time; // key event is a little complex, so // it will be handled in its own function. - _handle_key_event(window_id, (XKeyEvent *)&event, events, event_index); + _handle_key_event(window_id, &event.xkey, events, event_index); } break; case SelectionNotify: |