mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-05-07 14:48:11 +03:00
fix(terminal): reconnect suppress next output
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -58,8 +58,7 @@ class _TerminalPageState extends State<TerminalPage>
|
||||
super.initState();
|
||||
|
||||
// Listen for tab selection changes to request focus
|
||||
_tabStateSubscription =
|
||||
widget.tabController.state.listen(_onTabStateChanged);
|
||||
_tabStateSubscription = widget.tabController.state.listen(_onTabStateChanged);
|
||||
|
||||
// Use shared FFI instance from connection manager
|
||||
_ffi = TerminalConnectionManager.getConnection(
|
||||
@@ -146,9 +145,7 @@ class _TerminalPageState extends State<TerminalPage>
|
||||
// Use post-frame callback to ensure widget is fully laid out in focus tree
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
// Re-check conditions after frame: mounted, focusable, still selected, not already focused
|
||||
if (!mounted ||
|
||||
!_terminalFocusNode.canRequestFocus ||
|
||||
_terminalFocusNode.hasFocus) return;
|
||||
if (!mounted || !_terminalFocusNode.canRequestFocus || _terminalFocusNode.hasFocus) return;
|
||||
final state = widget.tabController.state.value;
|
||||
if (state.selected >= 0 && state.selected < state.tabs.length) {
|
||||
if (state.tabs[state.selected].key == widget.tabKey) {
|
||||
|
||||
Reference in New Issue
Block a user