Revert "Partially unrevert 05e82c24 for macOS which still needs it"

This reverts commit 080421f2fb.
This commit is contained in:
Cameron Gutman
2020-05-06 21:41:57 -07:00
parent 080421f2fb
commit 51c4ecc879
4 changed files with 1 additions and 57 deletions

View File

@@ -122,29 +122,5 @@ Uint32 SdlInputHandler::mouseMoveTimerCallback(Uint32 interval, void *param)
LiSendMouseMoveEvent(deltaX, deltaY);
}
if (me->m_AbsoluteMouseMode && me->m_PendingFocusGain) {
int mouseX, mouseY;
int windowX, windowY;
SDL_Event event;
Uint32 buttonState = SDL_GetGlobalMouseState(&mouseX, &mouseY);
SDL_GetWindowPosition(me->m_Window, &windowX, &windowY);
// Send synthetic mouse move events until the button is released
event.motion.type = SDL_MOUSEMOTION;
event.motion.timestamp = SDL_GetTicks();
event.motion.windowID = SDL_GetWindowID(me->m_Window);
event.motion.which = 0;
event.motion.state = buttonState;
event.motion.x = mouseX - windowX;
event.motion.y = mouseY - windowY;
event.motion.xrel = 0;
event.motion.yrel = 0;
SDL_PushEvent(&event);
if ((buttonState & SDL_BUTTON_LMASK) == 0) {
me->m_PendingFocusGain = false;
}
}
return interval;
}