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

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 2899053007: Don't do DefWindowProc on WM_NCACTIVATE if there's no frame. (Closed)
Patch Set: add comment Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index de7223ccbe729e6ac7a3b45c92ffc8b72de1fb94..3c67457a6421cc56b0e54216f30d30cdc39db1a3 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1819,7 +1819,11 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
if (IsVisible())
delegate_->SchedulePaint();
- if (delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN) {
+ // Calling DefWindowProc is only necessary if there's a system frame being
+ // drawn. Otherwise it can draw an incorrect title bar and cause visual
+ // corruption.
+ if (!delegate_->HasFrame() ||
+ delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN) {
SetMsgHandled(TRUE);
return TRUE;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698