summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorJeremy Tan <jtanx@outlook.com>2016-09-17 20:46:30 +0800
committerРуслан Ижбулатов <lrn1986@gmail.com>2016-09-19 12:36:53 +0000
commitb6ac1b4bbf46221ee33fcca8f49c2c67c6cb6ed8 (patch)
treecd619eabb486f384012134dee41ee1499a6ff3d9 /gdk
parenta5c8fedf47759d5dbdd92e9b57e830040153f710 (diff)
downloadgtk+-b6ac1b4bbf46221ee33fcca8f49c2c67c6cb6ed8.tar.gz
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
Diffstat (limited to 'gdk')
-rw-r--r--gdk/win32/gdkevents-win32.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 220771b152..363193ab26 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -2281,6 +2281,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 (keyboard_grab &&
!propagate (&window, msg,
keyboard_grab->window,