summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-27 20:54:20 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-27 21:37:31 +0300
commit66b0d056ce523bcd8e172f1132be1a591d88885a (patch)
tree6a15c3200ce658370d7d34919f9bd2e4f1c612f1 /src
parent18957a712d12398b0881f5ee0fa41d18515ad1bf (diff)
downloadplus-66b0d056ce523bcd8e172f1132be1a591d88885a.tar.gz
plus-66b0d056ce523bcd8e172f1132be1a591d88885a.tar.bz2
plus-66b0d056ce523bcd8e172f1132be1a591d88885a.tar.xz
plus-66b0d056ce523bcd8e172f1132be1a591d88885a.zip
In mouse click emulation, before click send mouse move events.
Diffstat (limited to 'src')
-rw-r--r--src/gui/sdlinput.cpp4
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());