fix(desktop): keep browser surfaces interactive

This commit is contained in:
Mohamed Boudra
2026-08-07 22:34:59 +02:00
parent 98d3281cad
commit dc19b45f23
9 changed files with 234 additions and 34 deletions
+12
View File
@@ -463,6 +463,18 @@ ipcMain.handle("paseo:browser:set-workspace-active-browser", (event, rawInput: u
}
});
ipcMain.handle("paseo:browser:focus", (event, browserId: unknown): boolean => {
if (typeof browserId !== "string" || browserId.trim().length === 0) {
return false;
}
const contents = getPaseoBrowserWebContentsForHostWindow(browserId, event.sender.id);
if (!contents) {
return false;
}
contents.focus();
return true;
});
ipcMain.handle("paseo:browser:open-devtools", (event, browserId: unknown) => {
if (typeof browserId !== "string" || browserId.trim().length === 0) {
const result = {
+1
View File
@@ -111,6 +111,7 @@ contextBridge.exposeInMainWorld("paseoDesktop", {
ipcRenderer.invoke("paseo:browser:unregister-workspace-browser", browserId),
setWorkspaceActiveBrowser: (input: { workspaceId: string; browserId: string | null }) =>
ipcRenderer.invoke("paseo:browser:set-workspace-active-browser", input),
focus: (browserId: string) => ipcRenderer.invoke("paseo:browser:focus", browserId),
openDevTools: (browserId: string) =>
ipcRenderer.invoke("paseo:browser:open-devtools", browserId),
clearProfile: (legacyBrowserIds: string[]) =>