Commit 7af2fc83 authored by elawrence's avatar elawrence Committed by Commit bot

Ensure window border icons repaint when DWM is enabled

When the user movers the cursor over the minimize/maximize/close
buttons, DWM paints them in a hover state. If the user subsequently
moves the cursor out of the window, DWM was not repainting the icons
with the unhovered state because Chrome ate the WM_NCMOUSELEAVE
message.This change notifies DWM of the exit.

BUG=637114
TEST=Unmaximize Chrome. Hover Red-X at top right. Fling mouse upward.

R=sky@chromium.org

Review-Url: https://codereview.chromium.org/2244263002
Cr-Commit-Position: refs/heads/master@{#412541}
parent 2f05d7ff
...@@ -2652,8 +2652,13 @@ bool HWNDMessageHandler::HandleMouseInputForCaption(unsigned int message, ...@@ -2652,8 +2652,13 @@ bool HWNDMessageHandler::HandleMouseInputForCaption(unsigned int message,
break; break;
} }
case WM_NCMOUSELEAVE: case WM_NCMOUSELEAVE: {
// If the DWM is rendering the window controls, we need to give the DWM's
// default window procedure the chance to repaint the window border icons
if (HasSystemFrame())
handled = DwmDefWindowProc(hwnd(), WM_NCMOUSELEAVE, 0, 0, NULL) != 0;
break; break;
}
default: default:
left_button_down_on_caption_ = false; left_button_down_on_caption_ = false;
......
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