diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/ui/gfx/win/window_impl.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/gfx/win/window_impl.cc')
-rw-r--r-- | chromium/ui/gfx/win/window_impl.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chromium/ui/gfx/win/window_impl.cc b/chromium/ui/gfx/win/window_impl.cc index 8df35cdc651..9c4de6c604d 100644 --- a/chromium/ui/gfx/win/window_impl.cc +++ b/chromium/ui/gfx/win/window_impl.cc @@ -217,6 +217,8 @@ void WindowImpl::Init(HWND parent, const Rect& bounds) { reinterpret_cast<wchar_t*>(atom), NULL, window_style_, x, y, width, height, parent, NULL, NULL, this); + const DWORD create_window_error = ::GetLastError(); + // First nccalcszie (during CreateWindow) for captioned windows is // deliberately ignored so force a second one here to get the right // non-client set up. @@ -226,7 +228,7 @@ void WindowImpl::Init(HWND parent, const Rect& bounds) { SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); } - if (!hwnd_ && GetLastError() == 0) { + if (!hwnd_ && create_window_error == 0) { base::debug::Alias(&destroyed); base::debug::Alias(&hwnd); bool got_create = got_create_; @@ -248,7 +250,7 @@ void WindowImpl::Init(HWND parent, const Rect& bounds) { if (!destroyed) destroyed_ = NULL; - CheckWindowCreated(hwnd_); + CheckWindowCreated(hwnd_, create_window_error); // The window procedure should have set the data for us. CHECK_EQ(this, GetWindowUserData(hwnd)); |