always block desktop settings page if video connection exists (#10224)

1. Always block desktop settings page if video connection exists, both mouse event and key event are blocked..
2. Server control page always block key event.

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-12-08 18:26:55 +08:00 committed by GitHub
parent 1c17fddf51
commit d4a712bb32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 126 additions and 53 deletions

View file

@ -2809,7 +2809,7 @@ Widget buildRemoteBlock(
onExit: (event) => block.value = false,
child: Stack(children: [
// scope block tab
FocusScope(child: child, canRequestFocus: !block.value),
preventMouseKeyBuilder(child: child, block: block.value),
// mask block click, cm not block click and still use check_click_time to avoid block local click
if (mask)
Offstage(
@ -2821,6 +2821,11 @@ Widget buildRemoteBlock(
));
}
Widget preventMouseKeyBuilder({required Widget child, required bool block}) {
return ExcludeFocus(
excluding: block, child: AbsorbPointer(child: child, absorbing: block));
}
Widget unreadMessageCountBuilder(RxInt? count,
{double? size, double? fontSize}) {
return Obx(() => Offstage(