fix: remote desktop tabs reconnecting on every tab switch

This commit is contained in:
LukeGus committed 2026-10-01 14:38:49 -05:00
1 parent e4ffebb69c
commit 7dbdf36557
2 files changed
+4 -3

No files matched your search

+1
View File
@@ -320,6 +320,7 @@ export interface TabHandle {
isConnected?: () => boolean;
sendInput?: (data: string) => void;
paste?: (text: string) => void;
/** Repaint only. The shell calls it every time the tab becomes active. */
refresh?: () => void;
notifyResize?: () => void;
[key: string]: unknown;
@@ -108,8 +108,8 @@ function savedHostConfig(
export interface GuacamoleAppHandle {
disconnect: () => void;
isConnected: () => boolean;
/** Reconnects, from the tab bar's refresh. */
refresh: () => void;
/** The tab bar's refresh. The shell calls `refresh` on every tab switch. */
reconnect: () => void;
}
const GuacamoleApp = React.forwardRef<GuacamoleAppHandle, GuacamoleAppProps>(
@@ -290,7 +290,7 @@ const GuacamoleAppInner = React.forwardRef<
useImperativeHandle(ref, () => ({
disconnect: () => displayRef.current?.disconnect(),
isConnected: () => displayRef.current?.isConnected() === true,
refresh: () => reconnectRef.current(),
reconnect: () => reconnectRef.current(),
}));
const fetchToken = useCallback(async (): Promise<void> => {