diff --git a/VERSION b/VERSION index 029a663d..2dfd342f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-106-g9d6d137b50+1 \ No newline at end of file +B1-107-g687eddcc63+1 \ No newline at end of file diff --git a/c-host/platform/Windows/src/mousehook.c b/c-host/platform/Windows/src/mousehook.c index d8cd40ea..369696eb 100644 --- a/c-host/platform/Windows/src/mousehook.c +++ b/c-host/platform/Windows/src/mousehook.c @@ -29,6 +29,7 @@ struct mouseHook bool installed; HHOOK hook; MouseHookFn callback; + int x, y; }; static struct mouseHook mouseHook = { 0 }; @@ -92,7 +93,12 @@ static LRESULT WINAPI mouseHook_hook(int nCode, WPARAM wParam, LPARAM lParam) if (nCode == HC_ACTION && wParam == WM_MOUSEMOVE) { MSLLHOOKSTRUCT *msg = (MSLLHOOKSTRUCT *)lParam; - mouseHook.callback(msg->pt.x, msg->pt.y); + if (mouseHook.x != msg->pt.x || mouseHook.y != msg->pt.y) + { + mouseHook.x = msg->pt.x; + mouseHook.y = msg->pt.y; + mouseHook.callback(msg->pt.x, msg->pt.y); + } } return CallNextHookEx(mouseHook.hook, nCode, wParam, lParam); -} \ No newline at end of file +}