diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-27 20:54:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-27 21:37:31 +0300 |
commit | 66b0d056ce523bcd8e172f1132be1a591d88885a (patch) | |
tree | 6a15c3200ce658370d7d34919f9bd2e4f1c612f1 | |
parent | 18957a712d12398b0881f5ee0fa41d18515ad1bf (diff) | |
download | plus-66b0d056ce523bcd8e172f1132be1a591d88885a.tar.gz plus-66b0d056ce523bcd8e172f1132be1a591d88885a.tar.bz2 plus-66b0d056ce523bcd8e172f1132be1a591d88885a.tar.xz plus-66b0d056ce523bcd8e172f1132be1a591d88885a.zip |
In mouse click emulation, before click send mouse move events.
-rw-r--r-- | src/gui/sdlinput.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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()); |