Address Case of the Missing Monitor#7541
Conversation
niik
left a comment
There was a problem hiding this comment.
I've been able to reproduce the scenario outlined in #7418 on Windows (macOS seems to work just fine with the previous version as far as I can tell). Additionally, and more importantly, I've been able to confirm that the scenario is no longer reproducible with this bump. Here are my reproduction steps @say25 so that we can compare notes and perhaps figure out why you can still reproduce the issue even with the bumped package.
@say25 just to be certain, did you do a yarn build:dev before testing this? The functionality from electron-window-state is only being used in the main process and the main process needs to be rebuilt to pick up on package bumps like this.
My setup: Windows 8 laptop connected to a second display.
- Rebuild and launch from
development - Drag the window to the second display
- Close the application gracefully
At this point mywindow-state.jsonfile looked like this
{
"width": 1201,
"height": 826,
"x": -1890,
"y": -415,
"isMaximized": false,
"isFullScreen": false,
"displayBounds": { "x": -2560, "y": -576, "width": 2560, "height": 1440 }
}- Disconnect the second monitor by disconnecting the cable
- Launch the app again, verify that it appears to be off-screen.
- Close the app, switch to this branch
- Re-connect the second monitor
yarn && yarn rebuild:dev && yarn start- Verify that the window appears on the second display where I left it
- Gracefully exit the application
- Disconnect the second monitor by disconnecting the cable
yarn start- Verify that the application now appears on the primary (only) display.
Taking a look at what's changed since our previous version (mawie81/electron-window-state@v4.0.2...v5.0.3) I see nothing obvious to be concerned about, the bump seems to be a safe one.
I do, however, see a very happy addition in that it appears that they've added typescript declarations now. Could you be so kind @say25 and go through and remove our any casts such that we could leverage the type system for this module?
|
Shall remove the |
|
@say25 I'm gonna go ahead and bring this in since I've been able to reproduce the original issue and confirm that the update resolves it for me. I'd still love it if you could test it on your machine so that we can feed that data into either a stronger confirmation that the issue is resolved or a new issue with specific troubleshooting data. |
|
Seems like I can reproduce now (I recently had an issue with my machine and had to get a new motherboard maybe that was it?) |
Overview
Closes #7418
Closes #2107
Description
electron-window-stateto5.0.3jsonfile@^2.2.3Release notes
Notes: [Fixed] Application window positioned off-screen when using multiple monitors on Windows.