| 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);
|
| }
|
|
|