aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-30 20:55:55 +0000
committerDavid Robillard <d@drobilla.net>2012-04-30 20:55:55 +0000
commitca45ed7ccc334c8dc8065671ed436be705174b3c (patch)
tree5fd957deb1fa4fa86a2eea70c10b1b81b3ade7f7
parent4818ea9d9d93722786a829df4b44e3f782824dde (diff)
Implement key repeat ignore on Windows.
-rw-r--r--pugl/pugl_win.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp
index 6c4b07f..03bee11 100644
--- a/pugl/pugl_win.cpp
+++ b/pugl/pugl_win.cpp
@@ -212,8 +212,6 @@ puglProcessEvents(PuglView* view)
{
MSG msg;
PAINTSTRUCT ps;
- int button;
- bool down = true;
PuglKey key;
while (PeekMessage(&msg, view->impl->hwnd, 0, 0, PM_REMOVE)) {
setModifiers(view);
@@ -265,6 +263,9 @@ puglProcessEvents(PuglView* view)
}
break;
case WM_KEYDOWN:
+ if (view->ignoreKeyRepeat && (msg.lParam & (1 << 30))) {
+ break;
+ } // else nobreak
case WM_KEYUP:
if (key = keySymToSpecial(msg.wParam)) {
if (view->specialFunc) {