Reset SDL's internal in_title_click variable whenever a normal mouse up/down event is received. Fixes #1151.

This commit is contained in:
Lasse Öörni 2016-01-14 22:51:29 +02:00
parent c3f336829e
commit c46f414034

View File

@ -419,6 +419,10 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_MBUTTONDOWN:
case WM_XBUTTONDOWN:
{
// Urho3D: in_title_click may be erroneously left on with non-Aero styles, causing the hidden mouse centering to stop working.
// To work around, reset whenever a normal mouse button up/down event is received
data->in_title_click = SDL_FALSE;
SDL_Mouse *mouse = SDL_GetMouse();
if (!emulatedMouse && (!mouse->relative_mode || mouse->relative_mode_warp)) {
WIN_CheckWParamMouseButtons(wParam, data);