Skip to content
This repository was archived by the owner on May 22, 2020. It is now read-only.

Conversation

@dhamberlin
Copy link
Contributor

Description of Change

Jira: https://appoji.jira.com/browse/RUN-5493

This PR makes a few changes to the ExternalWindow API:

  • ExternalWindows can be registered by nativeId (nativeId === hwnd in Windows) OR uuid (if the uuid has already been assigned to an external process via e.g. System.launchExternalProcess
  • ExternalWindow.wrap returns a uuid, name, and nativeId to caller, ensuring that render-side ExternalWindows will always have all three, even if user wrapped the window by uuid or nativeId alone.
  • ExternalWindow uuids are locked on registration, released on window close.
  • nativeId is exposed on all ExternalWindow info objects, such as those returned by System.getAllExternalWindows as well as on 'external-window' events.
  • uuid in included on all ExternalWindow info objects and external window events if a) the window has already been wrapped as an ExternalWindow or b) the pid matches a process that is being tracked by ProcessTracker (e.g. those launched by launchExternalProcess)

Related js-adapter PR: HadoukenIO/js-adapter#341

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • automated tests are changed or added ( a couple private ones I will make public post-merge, and more to come)
  • relevant documentation is changed or added (more to come here, working on adding/updating tutorials now)
  • PR title starts with the JIRA ticket pull request process
  • PR release notes describe the change in a way relevant to app-developers (included in js-adapter PR)
  • PR has assigned reviewers

Release Notes

Notes:

@openfin-github-bot
Copy link

Test Results for 97047d0

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Sep 16, 2019
@dhamberlin dhamberlin added the do not merge PR is not ready to be merged label Sep 17, 2019
@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Sep 17, 2019
@openfin-github-bot
Copy link

Test Results for d62fe42

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Sep 17, 2019
@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Oct 8, 2019
@openfin-github-bot
Copy link

0b4518a

Git

  • core: develop <= RUN-5493-external-window-id-updates (0b4518a)
  • js-adapter: develop <= RUN-5493-external-window-id-updates (5fa4838)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 8, 2019
// 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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Oct 11, 2019
@openfin-github-bot
Copy link

1b8ed89

Git

  • core: develop <= RUN-5493-external-window-id-updates (1b8ed89)
  • js-adapter: develop <= RUN-5493-external-window-id-updates (5fa4838)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 11, 2019
@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Oct 15, 2019
@openfin-github-bot
Copy link

4c2e3ba

Git

  • core: develop <= RUN-5493-external-window-id-updates (4c2e3ba)
  • js-adapter: develop <= RUN-5493-external-window-id-updates (5fa4838)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 15, 2019
rdepena
rdepena previously approved these changes Oct 16, 2019
Copy link
Contributor

@tomer-openfin tomer-openfin left a 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

const { nativeId } = externalWindow;
const uuid = properIdentity.uuid || nativeId;
const name = properIdentity.name || nativeId;
const uuid = externalWindow.uuid || requestedIdentity.uuid || nativeId;
Copy link
Contributor

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?

Copy link
Contributor Author

@dhamberlin dhamberlin Oct 16, 2019

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.

@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Oct 16, 2019
@openfin-github-bot
Copy link

884685b

Git

  • core: develop <= RUN-5493-external-window-id-updates (884685b)
  • js-adapter: develop <= RUN-5493-external-window-id-updates (5fa4838)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

auto testing done Bot completed automated testing cla-present

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants