Index: ui/views/widget/native_widget_win.cc |
diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc |
index 6c65886a37bae6d3869250366ccc58c9088ea296..c6d735fa28619d281ffceaefe5a108b95baa5270 100644 |
--- a/ui/views/widget/native_widget_win.cc |
+++ b/ui/views/widget/native_widget_win.cc |
@@ -2006,9 +2006,14 @@ void NativeWidgetWin::OnSetFocus(HWND old_focused_window) { |
SetMsgHandled(FALSE); |
} |
+LRESULT NativeWidgetWin::OnSetIcon(UINT size_type, HICON new_icon) { |
+ // Use a ScopedRedrawLock to avoid weird non-client painting. |
+ return DefWindowProcWithRedrawLock(WM_SETICON, size_type, |
+ reinterpret_cast<LPARAM>(new_icon)); |
+} |
+ |
LRESULT NativeWidgetWin::OnSetText(const wchar_t* text) { |
- // DefWindowProc for WM_SETTEXT does weird non-client painting, so we need to |
- // call it inside a ScopedRedrawLock. |
+ // Use a ScopedRedrawLock to avoid weird non-client painting. |
return DefWindowProcWithRedrawLock(WM_SETTEXT, NULL, |
reinterpret_cast<LPARAM>(text)); |
} |