revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.07k stars 196 forks source link

fix(window): Use SDL2's centering strategy for create window #1059

Closed bryphe closed 3 years ago

bryphe commented 3 years ago

Issue: Came from https://github.com/onivim/oni2/issues/3349 - the centering strategy implemented in https://github.com/revery-ui/revery/commit/08c21312e21f02dd33a074c0d9e67a46b4a9d381 does not handle multi-monitor setups well (it will place the application window in between multiple monitors, if there are 2)

Fix: Just use SDL2's centering strategy, which will center on the relevant monitor based on where the application was started