diff --git a/packages/plugin-sdk/src/frontend.ts b/packages/plugin-sdk/src/frontend.ts index 5c93482e0..fa92480aa 100644 --- a/packages/plugin-sdk/src/frontend.ts +++ b/packages/plugin-sdk/src/frontend.ts @@ -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; diff --git a/plugins/remote-desktop/src/frontend/GuacamoleApp.tsx b/plugins/remote-desktop/src/frontend/GuacamoleApp.tsx index c95a5ef18..cee8e5fab 100644 --- a/plugins/remote-desktop/src/frontend/GuacamoleApp.tsx +++ b/plugins/remote-desktop/src/frontend/GuacamoleApp.tsx @@ -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( @@ -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 => {