Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fire window-created events for ElectronContainer at the end of the current event loop cycle #179

Merged

Conversation

bingenito
Copy link
Member

The GroupWindowManager attaches events to new windows as they are created. The event for window created is fired and provides a window id. Electron has not registered the window internally yet when this event is fired so any attempt to get a reference to the Electron BrowserWindow instance from within the event handler via fromId does not work. The group manager is currently working incorrectly since an undefined window causes it to attach handlers to every window as though it is initial setup. This is causing duplicate handlers.

@bingenito bingenito self-assigned this Jul 24, 2018
@bingenito bingenito requested a review from a team July 24, 2018 19:25
@codecov
Copy link

codecov bot commented Jul 24, 2018

Codecov Report

Merging #179 into master will decrease coverage by 0.07%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master    #179      +/-   ##
=========================================
- Coverage   93.87%   93.8%   -0.08%     
=========================================
  Files          15      15              
  Lines        1338    1339       +1     
  Branches      223     223              
=========================================
  Hits         1256    1256              
- Misses         82      83       +1
Impacted Files Coverage Δ
src/Electron/electron.ts 97.09% <0%> (-0.29%) ⬇️

@bingenito
Copy link
Member Author

Coverage decrease is from addition of one line within a block of a few lines that was already not covered.

@bingenito bingenito merged commit f3ff566 into morganstanley:master Jul 25, 2018
@bingenito bingenito deleted the electron-create-window-setimmediate branch September 26, 2018 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants