From b6d57bc7e11e084da874af7decd066dda685a30f Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 21 Dec 2015 14:34:11 +0100 Subject: Fix double click on windows. --- plugingui/nativewindow_win32.cc | 10 +++------- 1 file 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; } -- cgit v1.2.3