fix: win.center() on Windows (#42196)

fix: win.center() on Windows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot] 2024-05-16 10:15:34 -07:00 committed by GitHub
parent 574879fa40
commit 0f13974e90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1085,7 +1085,7 @@ void NativeWindowViews::Center() {
#else
HWND hwnd = GetAcceleratedWidget();
gfx::Size size = display::win::ScreenWin::DIPToScreenSize(hwnd, GetSize());
gfx::CenterAndSizeWindow(hwnd, hwnd, size);
gfx::CenterAndSizeWindow(nullptr, hwnd, size);
#endif
}