summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 23:15:32 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 23:15:32 +0000
commit6fa8f9125365e6309644f34c2b813ef25b20c1c8 (patch)
tree85fcf185dc3a9238d76c466032dc28675513d71a /views
parent1a1d52379d3df962fbd0c1976e0433be0e02b6e0 (diff)
downloadchromium_src-6fa8f9125365e6309644f34c2b813ef25b20c1c8.zip
chromium_src-6fa8f9125365e6309644f34c2b813ef25b20c1c8.tar.gz
chromium_src-6fa8f9125365e6309644f34c2b813ef25b20c1c8.tar.bz2
Fixes painting regression in classic mode. This makes the code match
what it was earlier on (around 11ish). I think Ben ended up putting this code in the wrong place. BUG=74604 TEST=best way to reproduce on current build is run in classic mode and alt-tab between chrome and desktop windows window. Review URL: http://codereview.chromium.org/7421004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-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 914afaa..41d38fd 100644
--- a/views/widget/native_widget_win.cc
+++ b/views/widget/native_widget_win.cc
@@ -1155,17 +1155,6 @@ 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);
}
@@ -1636,6 +1625,17 @@ 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();