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

Unified Diff: views/widget/native_widget_win.cc

Issue 8133009: Avoid DefWindowProc non-client rendering over our custom frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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: views/widget/native_widget_win.cc
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc
index 1afcb415b3385da5c65aa00bd830a673345eb37f..9290f4b21a84d80ae2592444b579620c71f1e022 100644
--- a/views/widget/native_widget_win.cc
+++ b/views/widget/native_widget_win.cc
@@ -1186,9 +1186,9 @@ void NativeWidgetWin::OnActivateApp(BOOL active, DWORD thread_id) {
// Another application was activated, we should reset any state that
// disables inactive rendering now.
delegate_->EnableInactiveRendering();
- // Update the native frame too, since it could be rendering the non-client
- // area.
- DefWindowProcWithRedrawLock(WM_NCACTIVATE, FALSE, 0);
+ // Also update the native frame if it is rendering the non-client area.
+ if (GetWidget()->ShouldUseNativeFrame())
+ DefWindowProcWithRedrawLock(WM_NCACTIVATE, FALSE, 0);
}
}
@@ -1626,6 +1626,12 @@ LRESULT NativeWidgetWin::OnNCActivate(BOOL active) {
if (IsActive())
delegate_->EnableInactiveRendering();
+ // Avoid DefWindowProc non-client rendering over our custom frame.
+ if (!GetWidget()->ShouldUseNativeFrame()) {
+ SetMsgHandled(TRUE);
+ return TRUE;
+ }
+
return DefWindowProcWithRedrawLock(WM_NCACTIVATE,
inactive_rendering_disabled || active, 0);
}
« 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