gdk-win32: low level hook slows down keyboard during block/sleep of main thread, e.g. during interactive debugging
Gdk-Win32 backend installs a low level keyboard hook at startup - link.
This hook has problems with debugger. Everytime the application is under a interactive debugging session (be it msvc, gdb etc) this hook causes slow keyboard typing. All applications in the system are affected because hook is system wide. Every keystroke adds a delay of about 1 - 5 seconds. This makes it hard to debug a Gtk application on Windows
Happens with MSVC2019, gdb (on up-to-date MSYS2) and a small Win32 utility that tracks memory leaks (which also uses DebugActiveProcess winAPI).
Steps to reproduce
- Compile a basic gtk test application with debug symbols
- Open the application in the debugger
- Put a breakpoint after gtk_init()
- When breakpoint is reached type with keyboard
OS: Windows 10 (x64)