diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-30 02:36:29 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-30 02:36:29 +0000 |
commit | 84b577985a1149a20f8abeaa500ceb6c44d1ae08 (patch) | |
tree | 55637b3c276405e4d79c2cb8334c82944749059a | |
parent | 052da70ff82db58bd32fa81a5d6124cdf1b0a282 (diff) | |
download | chromium_src-84b577985a1149a20f8abeaa500ceb6c44d1ae08.zip chromium_src-84b577985a1149a20f8abeaa500ceb6c44d1ae08.tar.gz chromium_src-84b577985a1149a20f8abeaa500ceb6c44d1ae08.tar.bz2 |
Merge 102708 - Skip DefWindowProcWithRedrawLock on WM_SETCURSOR.
My ScopedRedrawLock crrev.com/101642 (and related) seem to have exacerbated window rendering problems.
One clear scenario is moving the cursor into the Chrome window as contents below change.
OnSetCursor's ScopedRedrawLock allows obscured content to render and re-paint in front of Chrome.
crrev.com/85628 was the first change to use ScopedRedrawLock for WM_SETCURSOR.
I haven't observed any unwanted DefWindowProc painting yet, so this is promising.
This change should be thoroughly tested before considering merge.
BUG=97808
TEST=Chrome window painting artifacts when the cursor changes.
Review URL: http://codereview.chromium.org/8045002
TBR=msw@chromium.org
Review URL: http://codereview.chromium.org/8084019
git-svn-id: svn://svn.chromium.org/chrome/branches/874/src@103418 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | views/widget/native_widget_win.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc index 884b64c..12d0fac 100644 --- a/views/widget/native_widget_win.cc +++ b/views/widget/native_widget_win.cc @@ -1875,8 +1875,12 @@ LRESULT NativeWidgetWin::OnReflectedMessage(UINT msg, LRESULT NativeWidgetWin::OnSetCursor(UINT message, WPARAM w_param, LPARAM l_param) { - // This shouldn't hurt even if we're using the native frame. - return DefWindowProcWithRedrawLock(message, w_param, l_param); + // Using ScopedRedrawLock here frequently allows content behind this window to + // paint in front of this window, causing glaring rendering artifacts. + // If omitting ScopedRedrawLock here triggers caption rendering artifacts via + // DefWindowProc message handling, we'll need to find a better solution. + SetMsgHandled(FALSE); + return 0; } void NativeWidgetWin::OnSetFocus(HWND focused_window) { |