Closed sergeichestakov closed 1 year ago
Slack Link: [https://replit.slack.com/archives/C0509G0FJNL/p1685546439.358829](https://replit.slack.com/archives/C0509G0FJNL/p1685546439.358829) Sergei Chestakov: probably should special case how we restore window dimensions when you no longer have an external display. when I unplug from mine and re-open the app, the repl window keeps re-opening very far to the right of the screen and is barely visible
Hm, not sure if this is the right signal to react to, like, you could still have the same number of screens, but previously used a 50'' external TV, and now opening the app on 21'' external display?
I think maybe a more correct way would be to check if the stored window bounds fit within the available screen bounds, and if not, then adjust the window so it's visible?
Wdyt?
ahh yeah good point. was a bit unsure about this heuristic as well tbh. will try checking the bounds instead
@szymonkaliski I'm checking the bounds now instead in the latest commit. lmk what you think!
Why
It looks super weird when we restore the window bounds but the number of monitors has changed (esp if you remove an external monitor). Instead, we should just bail since you'll likely want to rearrange the dimensions or position of your window anyways in response to an external monitor being added or removed.
Fixes WS-34
What changed
Test plan