Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: ui/gfx/win/window_impl.cc

Issue 2574933002: Call EnableNonClientDpiScaling (Closed)
Patch Set: Fix Bad Test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/win/event_utils_win_unittest.cc ('k') | ui/views/win/hwnd_message_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/win/window_impl.cc
diff --git a/ui/gfx/win/window_impl.cc b/ui/gfx/win/window_impl.cc
index f7744687c97b396501d9cd4fe8ecb0258d637954..bf6994d94b1a35222d0bdf4e1a7947dac9bb4ea2 100644
--- a/ui/gfx/win/window_impl.cc
+++ b/ui/gfx/win/window_impl.cc
@@ -283,19 +283,20 @@ LRESULT CALLBACK WindowImpl::WndProc(HWND hwnd,
UINT message,
WPARAM w_param,
LPARAM l_param) {
+ WindowImpl* window = nullptr;
if (message == WM_NCCREATE) {
CREATESTRUCT* cs = reinterpret_cast<CREATESTRUCT*>(l_param);
- WindowImpl* window = reinterpret_cast<WindowImpl*>(cs->lpCreateParams);
+ window = reinterpret_cast<WindowImpl*>(cs->lpCreateParams);
DCHECK(window);
gfx::SetWindowUserData(hwnd, window);
window->hwnd_ = hwnd;
window->got_create_ = true;
if (hwnd)
window->got_valid_hwnd_ = true;
- return TRUE;
+ } else {
+ window = reinterpret_cast<WindowImpl*>(GetWindowUserData(hwnd));
}
- WindowImpl* window = reinterpret_cast<WindowImpl*>(GetWindowUserData(hwnd));
if (!window)
return 0;
« no previous file with comments | « ui/events/win/event_utils_win_unittest.cc ('k') | ui/views/win/hwnd_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698