summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_win32.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-12-21 14:34:11 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-12-21 14:34:11 +0100
commitb6d57bc7e11e084da874af7decd066dda685a30f (patch)
tree7833cabd28ae9c88e6750d50fb14bf3f994581df /plugingui/nativewindow_win32.cc
parent8323c667ef48ae131a433a2b3249fdcb652d684e (diff)
Fix double click on windows.
Diffstat (limited to 'plugingui/nativewindow_win32.cc')
-rw-r--r--plugingui/nativewindow_win32.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugingui/nativewindow_win32.cc b/plugingui/nativewindow_win32.cc
index 72e0598..cf39010 100644
--- a/plugingui/nativewindow_win32.cc
+++ b/plugingui/nativewindow_win32.cc
@@ -166,11 +166,6 @@ LRESULT CALLBACK NativeWindowWin32::dialogProc(HWND hwnd, UINT msg,
{
buttonEvent->direction = Direction::down;
}
- else
- {
- delete buttonEvent;
- break; // unknown direction
- }
buttonEvent->doubleClick = (msg == WM_LBUTTONDBLCLK ||
msg == WM_RBUTTONDBLCLK ||
@@ -191,7 +186,7 @@ LRESULT CALLBACK NativeWindowWin32::dialogProc(HWND hwnd, UINT msg,
case VK_UP: keyEvent->keycode = Key::up; break;
case VK_DOWN: keyEvent->keycode = Key::down; break;
case VK_BACK: keyEvent->keycode = Key::backspace; break;
- case VK_DELETE: keyEvent->keycode = Key::deleteKey; break;
+ case VK_DELETE: keyEvent->keycode = Key::deleteKey; break;
case VK_HOME: keyEvent->keycode = Key::home; break;
case VK_END: keyEvent->keycode = Key::end; break;
case VK_PRIOR: keyEvent->keycode = Key::pageUp; break;
@@ -201,7 +196,8 @@ LRESULT CALLBACK NativeWindowWin32::dialogProc(HWND hwnd, UINT msg,
}
keyEvent->text = "";
- keyEvent->direction = (msg == WM_KEYDOWN) ? Direction::down : Direction::up;
+ keyEvent->direction =
+ (msg == WM_KEYDOWN) ? Direction::down : Direction::up;
native->event = keyEvent;
}