summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--views/widget/native_widget_win.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc
index dce389b..efde6a9 100644
--- a/views/widget/native_widget_win.cc
+++ b/views/widget/native_widget_win.cc
@@ -1117,6 +1117,17 @@ LRESULT NativeWidgetWin::OnWndProc(UINT message, WPARAM w_param,
// Message handlers ------------------------------------------------------------
void NativeWidgetWin::OnActivate(UINT action, BOOL minimized, HWND window) {
+ if (!GetWidget()->ShouldUseNativeFrame()) {
+ // TODO(beng, et al): Hack to redraw this window and child windows
+ // synchronously upon activation. Not all child windows are redrawing
+ // themselves leading to issues like http://crbug.com/74604
+ // We redraw out-of-process HWNDs asynchronously to avoid hanging the
+ // whole app if a child HWND belonging to a hung plugin is encountered.
+ RedrawWindow(GetNativeView(), NULL, NULL,
+ RDW_NOCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW);
+ EnumChildWindows(GetNativeView(), EnumChildWindowsForRedraw, NULL);
+ }
+
SetMsgHandled(FALSE);
}
@@ -1569,17 +1580,6 @@ LRESULT NativeWidgetWin::OnNCActivate(BOOL active) {
if (IsVisible())
GetWidget()->non_client_view()->SchedulePaint();
- if (!GetWidget()->ShouldUseNativeFrame()) {
- // TODO(beng, et al): Hack to redraw this window and child windows
- // synchronously upon activation. Not all child windows are redrawing
- // themselves leading to issues like http://crbug.com/74604
- // We redraw out-of-process HWNDs asynchronously to avoid hanging the
- // whole app if a child HWND belonging to a hung plugin is encountered.
- RedrawWindow(GetNativeView(), NULL, NULL,
- RDW_NOCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW);
- EnumChildWindows(GetNativeView(), EnumChildWindowsForRedraw, NULL);
- }
-
// If we're active again, we should be allowed to render as inactive, so
// tell the non-client view.
bool inactive_rendering_disabled = delegate_->IsInactiveRenderingDisabled();