Commit 1fd5e410 authored by jbauman's avatar jbauman Committed by Commit bot

Remove code for losing activation when child window activated.

This was intended only for use with NPAPI (now dead), and causes issues by thinking it can activate the DirectComposition child window.

BUG=580938

Review URL: https://codereview.chromium.org/1630873003

Cr-Commit-Position: refs/heads/master@{#371960}
parent 070dc150
......@@ -1519,20 +1519,6 @@ LRESULT HWNDMessageHandler::OnMouseActivate(UINT message,
::RemoveProp(hwnd(), ui::kIgnoreTouchMouseActivateForWindow);
return MA_NOACTIVATE;
}
// A child window activation should be treated as if we lost activation.
POINT cursor_pos = {0};
::GetCursorPos(&cursor_pos);
::ScreenToClient(hwnd(), &cursor_pos);
// The code below exists for child windows like NPAPI plugins etc which need
// to be activated whenever we receive a WM_MOUSEACTIVATE message. Don't put
// transparent child windows in this bucket as they are not supposed to grab
// activation.
// TODO(ananta)
// Get rid of this code when we deprecate NPAPI plugins.
HWND child = ::RealChildWindowFromPoint(hwnd(), cursor_pos);
if (::IsWindow(child) && child != hwnd() && ::IsWindowVisible(child) &&
!(::GetWindowLong(child, GWL_EXSTYLE) & WS_EX_TRANSPARENT))
PostProcessActivateMessage(WA_INACTIVE, false);
// TODO(beng): resolve this with the GetWindowLong() check on the subsequent
// line.
......
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