GDK-W32-Ignore-autorepeated-key-presses-on-modifier-keys.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From: Jeremy Tan <jtanx@outlook.com>
  2. Date: Sat, 17 Sep 2016 20:46:30 +0800
  3. Subject: GDK W32: Ignore autorepeated key presses on modifier keys
  4. The X11 backend does not send autorepeated messages for modifier keys,
  5. and doing so prevents motion compression from working.
  6. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=771568
  7. Origin: upstream, 2.24.33, commit:61162225f712df648f38fd12bc0817cfa9f79a64
  8. ---
  9. gdk/win32/gdkevents-win32.c | 8 ++++++++
  10. 1 file changed, 8 insertions(+)
  11. diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
  12. index e52f21c..ac91fa6 100644
  13. --- a/gdk/win32/gdkevents-win32.c
  14. +++ b/gdk/win32/gdkevents-win32.c
  15. @@ -2274,6 +2274,14 @@ gdk_event_translate (MSG *msg,
  16. in_ime_composition)
  17. break;
  18. + /* Ignore autorepeats on modifiers */
  19. + if (msg->message == WM_KEYDOWN &&
  20. + (msg->wParam == VK_MENU ||
  21. + msg->wParam == VK_CONTROL ||
  22. + msg->wParam == VK_SHIFT) &&
  23. + ((HIWORD(msg->lParam) & KF_REPEAT) >= 1))
  24. + break;
  25. +
  26. if (!propagate (&window, msg,
  27. _gdk_display->keyboard_grab.window,
  28. _gdk_display->keyboard_grab.owner_events,