debug
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
e89ae475f6
commit
b9c8df7019
@ -638,6 +638,7 @@ class InputModel {
|
|||||||
Offset offset, {
|
Offset offset, {
|
||||||
bool onExit = false,
|
bool onExit = false,
|
||||||
}) {
|
}) {
|
||||||
|
debugPrint('REMOVE ME ========================= 111');
|
||||||
double x = offset.dx;
|
double x = offset.dx;
|
||||||
double y = max(0.0, offset.dy);
|
double y = max(0.0, offset.dy);
|
||||||
if (_checkPeerControlProtected(x, y)) {
|
if (_checkPeerControlProtected(x, y)) {
|
||||||
@ -671,11 +672,12 @@ class InputModel {
|
|||||||
buttons: evt['buttons'],
|
buttons: evt['buttons'],
|
||||||
);
|
);
|
||||||
if (pos == null) {
|
if (pos == null) {
|
||||||
|
debugPrint('REMOVE ME ========================= 222');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type != '') {
|
if (type != '') {
|
||||||
evt['x'] = 0;
|
evt['x'] = '0';
|
||||||
evt['y'] = 0;
|
evt['y'] = '0';
|
||||||
} else {
|
} else {
|
||||||
evt['x'] = '${pos.x}';
|
evt['x'] = '${pos.x}';
|
||||||
evt['y'] = '${pos.y}';
|
evt['y'] = '${pos.y}';
|
||||||
@ -689,6 +691,7 @@ class InputModel {
|
|||||||
kForwardMouseButton: 'forward'
|
kForwardMouseButton: 'forward'
|
||||||
};
|
};
|
||||||
evt['buttons'] = mapButtons[evt['buttons']] ?? '';
|
evt['buttons'] = mapButtons[evt['buttons']] ?? '';
|
||||||
|
debugPrint('REMOVE ME ========================= 333 $evt');
|
||||||
bind.sessionSendMouse(sessionId: sessionId, msg: json.encode(modify(evt)));
|
bind.sessionSendMouse(sessionId: sessionId, msg: json.encode(modify(evt)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1546,9 +1546,7 @@ impl Connection {
|
|||||||
match msg.union {
|
match msg.union {
|
||||||
Some(message::Union::MouseEvent(me)) => {
|
Some(message::Union::MouseEvent(me)) => {
|
||||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||||
if let Err(e) =
|
if let Err(e) = call_main_service_pointer_input("mouse", me.mask, me.x, me.y) {
|
||||||
call_main_service_pointer_input("mouse", me.mask, me.x, me.y)
|
|
||||||
{
|
|
||||||
log::debug!("call_main_service_pointer_input fail:{}", e);
|
log::debug!("call_main_service_pointer_input fail:{}", e);
|
||||||
}
|
}
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
@ -1582,12 +1580,7 @@ impl Connection {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
Some(touch_event::Union::PanEnd(pan_end)) => {
|
Some(touch_event::Union::PanEnd(pan_end)) => {
|
||||||
call_main_service_pointer_input(
|
call_main_service_pointer_input("touch", 6, pan_end.x, pan_end.y)
|
||||||
"touch",
|
|
||||||
6,
|
|
||||||
pan_end.x,
|
|
||||||
pan_end.y,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
_ => Ok(()),
|
_ => Ok(()),
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user