Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app/onivim#3349): Fix broken window positioning w/ multiple monit…
…ors (onivim#3443) __Issue:__ As described in onivim#3349 , when there are two monitors, Onivim will by default start in the middle of both of them. __Defect:__ The root cause is this commit to Revery - revery-ui/revery@08c2131 - the centering logic causes the calculated position to be in the center of the two monitors. In addition, in the presence of this bug, there weren't good tools in place to workaround it - ideally, there should be a way to manually specify the window position in the absolute worst case. __Fix:__ The fix for the bug is in Revery, here: revery-ui/revery#1059 In addition, this PR adds a couple of command-line options: __`--list-displays`__ - shows a list of available displays and positions, like: ```sh oni2 --list-displays Displays: 0: LG Ultra HD - x: 0 y: 0 width: 1920 height: 1080 1: Color LCD - x: 305 y: 1080 width: 1440 height: 900 ``` __Todo:__ - [x] Need to account for the 'upgrade' case - there may be values persisted for `windowX` and `windowY` in the store, so that users hitting onivim#3349 would continue to hit it, even with this fix. __`--window-position` - set the window position manually, in the display space. For example, if I wanted to start the Onivim on the second display above, I could use `oni2 --window-position=305,1080` to position it on the second display. - [x] Depends on revery-ui/revery#1059 Fixes onivim#3349
- Loading branch information