mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
fix: notepad save issue
This commit is contained in:
parent
87f7fc0265
commit
bc51d4bd52
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import path from "../lib/path.js"
|
import path from "../lib/path.js"
|
||||||
import { PROCESS_RUNNING, PortalProcess, PseudoProcess } from "../definitions.js";
|
import { PROCESS_IPC_ATTACHED, PROCESS_RUNNING, PortalProcess, PseudoProcess } from "../definitions.js";
|
||||||
import UIWindow from "../UI/UIWindow.js";
|
import UIWindow from "../UI/UIWindow.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -361,6 +361,26 @@ const launch_app = async (options)=>{
|
|||||||
|
|
||||||
const el = await el_win;
|
const el = await el_win;
|
||||||
process.references.el_win = el;
|
process.references.el_win = el;
|
||||||
|
|
||||||
|
if ( ! options.launched_by_exec_service ) {
|
||||||
|
process.onchange('ipc_status', value => {
|
||||||
|
if ( value !== PROCESS_IPC_ATTACHED ) return;
|
||||||
|
|
||||||
|
$(process.references.iframe).attr('data-appUsesSDK', 'true');
|
||||||
|
|
||||||
|
send_child_launched_msg({ uses_sdk: true });
|
||||||
|
|
||||||
|
// Send any saved broadcasts to the new app
|
||||||
|
globalThis.services.get('broadcast').sendSavedBroadcastsTo(child_instance_id);
|
||||||
|
|
||||||
|
// If `window-active` is set (meanign the window is focused), focus the window one more time
|
||||||
|
// this is to ensure that the iframe is `definitely` focused and can receive keyboard events (e.g. keydown)
|
||||||
|
if($(process.references.el_win).hasClass('window-active')){
|
||||||
|
$(process.references.el_win).focusWindow();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
process.chstatus(PROCESS_RUNNING);
|
process.chstatus(PROCESS_RUNNING);
|
||||||
|
|
||||||
$(el).on('remove', () => {
|
$(el).on('remove', () => {
|
||||||
@ -368,6 +388,7 @@ const launch_app = async (options)=>{
|
|||||||
svc_process.unregister(process.uuid);
|
svc_process.unregister(process.uuid);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return process;
|
return process;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ export class ExecService extends Service {
|
|||||||
|
|
||||||
// The "body" of this method is in a separate file
|
// The "body" of this method is in a separate file
|
||||||
const child_process = await launch_app({
|
const child_process = await launch_app({
|
||||||
|
launched_by_exec_service: true,
|
||||||
name: app_name,
|
name: app_name,
|
||||||
pseudonym,
|
pseudonym,
|
||||||
args: args ?? {},
|
args: args ?? {},
|
||||||
|
Loading…
Reference in New Issue
Block a user