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