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

Unified Diff: ui/views/widget/native_widget_win.cc

Issue 10826160: Restore NativeWidgetWin::OnSetIcon to eliminate classic theme titlebar flickering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months 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/views/widget/native_widget_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « ui/views/widget/native_widget_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698