-
Notifications
You must be signed in to change notification settings - Fork 50
Run 5493 external window id updates #939
base: develop
Are you sure you want to change the base?
Run 5493 external window id updates #939
Conversation
Test Results for 97047d0
|
Test Results for d62fe42
|
Git
Asars used for testingTest results
|
src/browser/api/external_window.ts
Outdated
| // Window grouping stub (makes external windows work with our original disabled frame group tracker) | ||
| // Also some of the _options' values are needed in OpenFin Layouts | ||
| function setAdditionalProperties(externalWindow: Shapes.ExternalWindow, properIdentity: Shapes.NativeWindowIdentity): Shapes.GroupWindow { | ||
| function setAdditionalProperties(externalWindow: Shapes.ExternalWindow, requestedId: Shapes.NativeWindowIdentity): Shapes.GroupWindow { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel like 'requestedId' is a string. How about 'requestedIdentity' instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. Updated.
Git
Asars used for testingTest results
|
Git
Asars used for testingTest results
|
tomer-openfin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added 1 comment.
except that it lgtm
src/browser/api/external_window.ts
Outdated
| const { nativeId } = externalWindow; | ||
| const uuid = properIdentity.uuid || nativeId; | ||
| const name = properIdentity.name || nativeId; | ||
| const uuid = externalWindow.uuid || requestedIdentity.uuid || nativeId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible that the nativeId here is already taken as a uuid by some other window?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this. Actually not a problem because we ensure that we have a usable uuid before we call this function (line 273: const uuid = identity.uuid || electronApp.generateGUID();, so we'll try a user-provided uuid if included, otherwise use a new guid).
This does mean that these || are unnecessary. Removed them accordingly.
…berlin/core into RUN-5493-external-window-id-updates
Git
Asars used for testingTest results
|
Description of Change
Jira: https://appoji.jira.com/browse/RUN-5493
This PR makes a few changes to the ExternalWindow API:
nativeId(nativeId === hwnd in Windows) OR uuid (if the uuid has already been assigned to an external process via e.g.System.launchExternalProcessExternalWindow.wrapreturns a uuid, name, and nativeId to caller, ensuring that render-sideExternalWindows will always have all three, even if user wrapped the window byuuidornativeIdalone.System.getAllExternalWindowsas well as on 'external-window' events.launchExternalProcess)Related js-adapter PR: HadoukenIO/js-adapter#341
Checklist
npm testpassesRelease Notes
Notes: