[gtk/gtk-2-24] GDK W32: Ignore autorepeated key presses on modifier keys
- From: LRN <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-2-24] GDK W32: Ignore autorepeated key presses on modifier keys
- Date: Sat, 17 Feb 2018 18:48:02 +0000 (UTC)
commit 61162225f712df648f38fd12bc0817cfa9f79a64
Author: Jeremy Tan <jtanx outlook com>
Date: Sat Sep 17 20:46:30 2016 +0800
GDK W32: Ignore autorepeated key presses on modifier keys
The X11 backend does not send autorepeated messages for modifier keys,
and doing so prevents motion compression from working.
https://bugzilla.gnome.org/show_bug.cgi?id=771568
gdk/win32/gdkevents-win32.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index e52f21c52e..ac91fa64cb 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -2274,6 +2274,14 @@ gdk_event_translate (MSG *msg,
in_ime_composition)
break;
+ /* Ignore autorepeats on modifiers */
+ if (msg->message == WM_KEYDOWN &&
+ (msg->wParam == VK_MENU ||
+ msg->wParam == VK_CONTROL ||
+ msg->wParam == VK_SHIFT) &&
+ ((HIWORD(msg->lParam) & KF_REPEAT) >= 1))
+ break;
+
if (!propagate (&window, msg,
_gdk_display->keyboard_grab.window,
_gdk_display->keyboard_grab.owner_events,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]