Browse Source

fix: `win.center()` on Windows (#42195)

fix: win.center() on Windows
Shelley Vohr 11 months ago
parent
commit
a54afabe04
1 changed files with 1 additions and 1 deletions
  1. 1 1
      shell/browser/native_window_views.cc

+ 1 - 1
shell/browser/native_window_views.cc

@@ -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
 }