From c22a69ffb1809ad7959f8a8fe934052369b5d44f Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Sat, 26 Oct 2024 03:07:02 -0400 Subject: [PATCH] fix: errors thrown by launch_app Fixes errors that were noticed being thrown by launch_app, specifically in the branch of logic when launch_app is called NOT via ExecService. This branch of logic was added to fix an issue where notepad wasn't prompting to save unsaved changes on close because data-appusessdk was not properly set to true. The fix still worked, despite throwing these errors, because setting data-appUsesSDK to true is the first thing it does. However, broadcast messages to apps launched with launch_app NOT via ExecService would have been broken. --- src/gui/src/helpers/launch_app.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/src/helpers/launch_app.js b/src/gui/src/helpers/launch_app.js index 36367664..e6c4f8da 100644 --- a/src/gui/src/helpers/launch_app.js +++ b/src/gui/src/helpers/launch_app.js @@ -368,10 +368,8 @@ const launch_app = async (options)=>{ $(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); + globalThis.services.get('broadcast').sendSavedBroadcastsTo(uuid); // 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)