Skip autogenerated mouse move events in Cocoa backend regardless of mode

This commit is contained in:
alexey.lysiuk 2017-07-08 13:35:09 +03:00
parent 9292b23bb4
commit 58b348e75a

View file

@ -509,19 +509,6 @@ void ProcessMouseMoveInMenu(NSEvent* theEvent)
void ProcessMouseMoveInGame(NSEvent* theEvent) void ProcessMouseMoveInGame(NSEvent* theEvent)
{ {
if (!use_mouse)
{
return;
}
// TODO: remove this magic!
if (s_skipMouseMoves > 0)
{
--s_skipMouseMoves;
return;
}
int x([theEvent deltaX]); int x([theEvent deltaX]);
int y(-[theEvent deltaY]); int y(-[theEvent deltaY]);
@ -648,6 +635,12 @@ void ProcessMouseMoveEvent(NSEvent* theEvent)
return; return;
} }
if (s_skipMouseMoves > 0)
{
--s_skipMouseMoves;
return;
}
if (GUICapture) if (GUICapture)
{ {
ProcessMouseMoveInMenu(theEvent); ProcessMouseMoveInMenu(theEvent);