resetMouse if show keyboard
This commit is contained in:
parent
1414ff5fcb
commit
4d730586ae
@ -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) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user