aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/WindowsWindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/native/WindowsWindow.c')
-rwxr-xr-xsrc/newt/native/WindowsWindow.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c
index a742f5acf..9d802b213 100755
--- a/src/newt/native/WindowsWindow.c
+++ b/src/newt/native/WindowsWindow.c
@@ -94,6 +94,16 @@ static jint ConvertModifiers(WPARAM wParam) {
if (HIBYTE(GetKeyState(VK_MENU)) != 0) {
modifiers |= EVENT_ALT_MASK;
}
+ if (HIBYTE(GetKeyState(VK_LBUTTON)) != 0) {
+ modifiers |= EVENT_BUTTON1_MASK;
+ }
+ if (HIBYTE(GetKeyState(VK_MBUTTON)) != 0) {
+ modifiers |= EVENT_BUTTON2_MASK;
+ }
+ if (HIBYTE(GetKeyState(VK_RBUTTON)) != 0) {
+ modifiers |= EVENT_BUTTON3_MASK;
+ }
+
return modifiers;
}
@@ -209,6 +219,12 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message,
useDefWindowProc = 1;
break;
+ case WM_ERASEBKGND:
+ // ignore erase background
+ useDefWindowProc = 0;
+ break;
+
+
// FIXME: generate EVENT_MOUSE_ENTERED, EVENT_MOUSE_EXITED
default:
useDefWindowProc = 1;