Merge pull request #5646 from dignow/fix/android_input_connect_passwd

fix, android soft keyboard, 'delete input' on conn password
This commit is contained in:
RustDesk 2023-09-10 21:02:47 +08:00 committed by GitHub
commit 15c72fe7d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,7 +275,9 @@ class _RemotePageState extends State<RemotePage> {
return Offstage(); return Offstage();
}(), }(),
_bottomWidget(), _bottomWidget(),
gFFI.ffiModel.pi.isSet.isFalse ? emptyOverlay(MyTheme.canvasColor) : Offstage(), gFFI.ffiModel.pi.isSet.isFalse
? emptyOverlay(MyTheme.canvasColor)
: Offstage(),
], ],
)), )),
body: Overlay( body: Overlay(
@ -316,12 +318,17 @@ class _RemotePageState extends State<RemotePage> {
Widget getRawPointerAndKeyBody(Widget child) { Widget getRawPointerAndKeyBody(Widget child) {
final keyboard = gFFI.ffiModel.permissions['keyboard'] != false; final keyboard = gFFI.ffiModel.permissions['keyboard'] != false;
return RawPointerMouseRegion( return RawPointerMouseRegion(
cursor: keyboard ? SystemMouseCursors.none : MouseCursor.defer, cursor: keyboard ? SystemMouseCursors.none : MouseCursor.defer,
inputModel: inputModel, inputModel: inputModel,
child: RawKeyFocusScope( // Disable RawKeyFocusScope before the connecting is established.
focusNode: _physicalFocusNode, // The "Delete" key on the soft keyboard may be grabbed when inputting the password dialog.
inputModel: inputModel, child: gFFI.ffiModel.pi.isSet.isTrue
child: child)); ? RawKeyFocusScope(
focusNode: _physicalFocusNode,
inputModel: inputModel,
child: child)
: child,
);
} }
Widget getBottomAppBar(bool keyboard) { Widget getBottomAppBar(bool keyboard) {