mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-11 02:41:28 +03:00
resetMouse if show keyboard
This commit is contained in:
@@ -156,6 +156,7 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
void openKeyboard() {
|
void openKeyboard() {
|
||||||
// destroy first, so that our _value trick can work
|
// destroy first, so that our _value trick can work
|
||||||
_value = initText;
|
_value = initText;
|
||||||
|
resetMouse();
|
||||||
setState(() => _showKeyboard = false);
|
setState(() => _showKeyboard = false);
|
||||||
_timer?.cancel();
|
_timer?.cancel();
|
||||||
_timer = Timer(Duration(milliseconds: 30), () {
|
_timer = Timer(Duration(milliseconds: 30), () {
|
||||||
@@ -171,6 +172,13 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resetMouse() {
|
||||||
|
_drag = false;
|
||||||
|
_scroll = false;
|
||||||
|
_right = false;
|
||||||
|
_mouseTools = false;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final pi = Provider.of<FfiModel>(context).pi;
|
final pi = Provider.of<FfiModel>(context).pi;
|
||||||
@@ -300,12 +308,7 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
onScaleEnd: (details) {
|
onScaleEnd: (details) {
|
||||||
if (_drag) {
|
if (_drag) {
|
||||||
FFI.sendMouse('up', 'left');
|
FFI.sendMouse('up', 'left');
|
||||||
setState(() {
|
setState(resetMouse);
|
||||||
_drag = false;
|
|
||||||
_scroll = false;
|
|
||||||
_right = false;
|
|
||||||
_mouseTools = false;
|
|
||||||
});
|
|
||||||
} else if (_scroll) {
|
} else if (_scroll) {
|
||||||
var dy = (_yOffset - _yOffset0) / 10;
|
var dy = (_yOffset - _yOffset0) / 10;
|
||||||
if (dy.abs() > 0.1) {
|
if (dy.abs() > 0.1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user