mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-28 23:59:05 +08:00
do not check keyboard permission on menu build
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
e876adaec5
commit
6740587d8a
@ -1542,11 +1542,15 @@ class _KeyboardMenu extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var ffiModel = Provider.of<FfiModel>(context);
|
// Do not check permission here?
|
||||||
if (ffiModel.permissions['keyboard'] == false) return Offstage();
|
// var ffiModel = Provider.of<FfiModel>(context);
|
||||||
|
// if (ffiModel.permissions['keyboard'] == false) return Offstage();
|
||||||
if (stateGlobal.grabKeyboard) {
|
if (stateGlobal.grabKeyboard) {
|
||||||
if (bind.sessionIsKeyboardModeSupported(id: id, mode: _kKeyMapMode)) {
|
if (bind.sessionIsKeyboardModeSupported(id: id, mode: _kKeyMapMode)) {
|
||||||
bind.sessionSetKeyboardMode(id: id, value: _kKeyMapMode);
|
bind.sessionSetKeyboardMode(id: id, value: _kKeyMapMode);
|
||||||
|
} else if (bind.sessionIsKeyboardModeSupported(
|
||||||
|
id: id, mode: _kKeyLegacyMode)) {
|
||||||
|
bind.sessionSetKeyboardMode(id: id, value: _kKeyLegacyMode);
|
||||||
}
|
}
|
||||||
return Offstage();
|
return Offstage();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user