mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
desktop mouse better control
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -308,9 +308,15 @@ class InputModel {
|
||||
double y = max(0.0, evt['y']);
|
||||
final cursorModel = parent.target!.cursorModel;
|
||||
|
||||
if (cursorModel.is_peer_control_protected) {
|
||||
last_mouse_pos = ui.Offset(x, y);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cursorModel.got_mouse_control) {
|
||||
bool self_get_control = (x - last_mouse_pos.dx).abs() > 12 ||
|
||||
(y - last_mouse_pos.dy).abs() > 12;
|
||||
bool self_get_control =
|
||||
(x - last_mouse_pos.dx).abs() > kMouseControlDistance ||
|
||||
(y - last_mouse_pos.dy).abs() > kMouseControlDistance;
|
||||
if (self_get_control) {
|
||||
cursorModel.got_mouse_control = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user