mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 18:36:11 +02:00
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
c168b7e979
commit
004c2e069c
1 changed files with 10 additions and 0 deletions
|
@ -181,6 +181,8 @@ class InputModel {
|
|||
|
||||
var _lastScale = 1.0;
|
||||
|
||||
bool _pointerMovedAfterEnter = false;
|
||||
|
||||
// mouse
|
||||
final isPhysicalMouse = false.obs;
|
||||
int _lastButtons = 0;
|
||||
|
@ -441,6 +443,7 @@ class InputModel {
|
|||
|
||||
void enterOrLeave(bool enter) {
|
||||
toReleaseKeys.release(handleRawKeyEvent);
|
||||
_pointerMovedAfterEnter = false;
|
||||
|
||||
// Fix status
|
||||
if (!enter) {
|
||||
|
@ -778,6 +781,7 @@ class InputModel {
|
|||
type = 'up';
|
||||
break;
|
||||
case _kMouseEventMove:
|
||||
_pointerMovedAfterEnter = true;
|
||||
isMove = true;
|
||||
break;
|
||||
default:
|
||||
|
@ -785,6 +789,12 @@ class InputModel {
|
|||
}
|
||||
evt['type'] = type;
|
||||
|
||||
if (type == 'down' && !_pointerMovedAfterEnter) {
|
||||
// Move mouse to the position of the down event first.
|
||||
lastMousePos = ui.Offset(x, y);
|
||||
refreshMousePos();
|
||||
}
|
||||
|
||||
final pos = handlePointerDevicePos(
|
||||
kPointerEventKindMouse,
|
||||
x,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue