From 66b0d056ce523bcd8e172f1132be1a591d88885a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 27 Jul 2017 20:54:20 +0300 Subject: In mouse click emulation, before click send mouse move events. --- src/gui/sdlinput.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index 1219ad247..1a26bdfb3 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -345,6 +345,10 @@ void SDLInput::simulateMouseClick(const int x, const int y, mouseInput.setX(x); mouseInput.setY(y); mouseInput.setReal(x, y); + mouseInput.setButton(MouseButton::EMPTY); + mouseInput.setType(MouseEventType::MOVED); + mouseInput.setTimeStamp(SDL_GetTicks()); + mMouseInputQueue.push(mouseInput); mouseInput.setButton(button); mouseInput.setType(MouseEventType::PRESSED); mouseInput.setTimeStamp(SDL_GetTicks()); -- cgit v1.2.3-70-g09d2