Commit 3d5fcb45 authored by Dana Fried's avatar Dana Fried Committed by Commit Bot

Follow-up: inline a piece of code that did not need precomputed.

See comment here:
https://chromium-review.googlesource.com/c/chromium/src/+/2239979/2/ui/views/win/hwnd_message_handler.cc#2087

Bug: 1088416
Change-Id: I820d345e8a52eb43c564e40592a6808aa31e8fac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2242234
Commit-Queue: Dana Fried <dfried@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777889}
parent 866f7391
...@@ -2084,7 +2084,6 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, ...@@ -2084,7 +2084,6 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
return TRUE; return TRUE;
delegate_->HandleNonClientActivationChanged(active); delegate_->HandleNonClientActivationChanged(active);
const bool paint_as_active = delegate_->ShouldPaintAsActive();
if (delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN) { if (delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN) {
// TODO(beng, et al): Hack to redraw this window and child windows // TODO(beng, et al): Hack to redraw this window and child windows
...@@ -2112,8 +2111,11 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, ...@@ -2112,8 +2111,11 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
return TRUE; return TRUE;
} }
return DefWindowProcWithRedrawLock(WM_NCACTIVATE, paint_as_active || active, // There are cases where ShouldPaintAsActive() becomes false as a result of
0); // code called between HandleNonClientActivationChanged() and here, hence the
// disjunction.
return DefWindowProcWithRedrawLock(
WM_NCACTIVATE, active || delegate_->ShouldPaintAsActive(), 0);
} }
LRESULT HWNDMessageHandler::OnNCCalcSize(BOOL mode, LPARAM l_param) { LRESULT HWNDMessageHandler::OnNCCalcSize(BOOL mode, LPARAM l_param) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment