1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-22 18:28:52 -05:00

Apply bananas

This commit is contained in:
Camilla Berglund 2015-10-18 21:23:22 +02:00
parent 2687622e8d
commit 14a18c8288

View File

@ -391,6 +391,13 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
{ {
const int mods = getKeyMods(); const int mods = getKeyMods();
if (window->touchInput)
{
// Skip emulated button events when touch input is enabled
if ((GetMessageExtraInfo() & 0xffffff00) == 0xff515700)
break;
}
SetCapture(hWnd); SetCapture(hWnd);
if (uMsg == WM_LBUTTONDOWN) if (uMsg == WM_LBUTTONDOWN)
@ -419,6 +426,13 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
{ {
const int mods = getKeyMods(); const int mods = getKeyMods();
if (window->touchInput)
{
// Skip emulated button events when touch input is enabled
if ((GetMessageExtraInfo() & 0xffffff00) == 0xff515700)
break;
}
ReleaseCapture(); ReleaseCapture();
if (uMsg == WM_LBUTTONUP) if (uMsg == WM_LBUTTONUP)
@ -473,7 +487,9 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
_glfwInputCursorEnter(window, GLFW_TRUE); _glfwInputCursorEnter(window, GLFW_TRUE);
} }
return 0; // NOTE: WM_MOUSEMOVE messages must be passed on to DefWindowProc
// for WM_TOUCH messages to be emitted
break;
} }
case WM_MOUSELEAVE: case WM_MOUSELEAVE: