fix(desktop): keep browser surfaces interactive
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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[]) =>
|
||||
|
||||
Reference in New Issue
Block a user