Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KDE Connect
Commits
92237d41
Commit
92237d41
authored
Jun 02, 2021
by
Piyush Aggarwal
🎮
Browse files
plugins/mousepad: wait for a microsecond to allow interpolation
parent
c00ea120
Pipeline
#63798
passed with stage
in 4 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/mousepad/windowsremoteinput.cpp
View file @
92237d41
...
...
@@ -8,6 +8,8 @@
#include <QCursor>
#include <QDebug>
#include <chrono>
#include <thread>
#include <Windows.h>
...
...
@@ -237,9 +239,9 @@ bool WindowsRemoteInput::handlePacket(const NetworkPacket& np)
}
else
{
//Is a mouse move event
POINT
point
;
if
(
GetCursorPos
(
&
point
))
{
return
SetCursorPos
(
point
.
x
+
(
int
)
dx
,
point
.
y
+
(
int
)
dy
);
}
else
{
return
false
;
SetCursorPos
(
point
.
x
+
(
int
)
dx
,
point
.
y
+
(
int
)
dy
);
// wait for a microsecond here to allow Windows to interpolate
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
microseconds
(
1
))
;
}
}
return
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment