Chromium Code Reviews| Index: ui/views/win/hwnd_message_handler.cc |
| diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc |
| index ae24d047e5c7bb0e5f666297e1ad87242ec4625c..ab68d3bf1becbd74b24b247c0c00efda5fff7415 100644 |
| --- a/ui/views/win/hwnd_message_handler.cc |
| +++ b/ui/views/win/hwnd_message_handler.cc |
| @@ -1549,8 +1549,14 @@ LRESULT HWNDMessageHandler::OnMouseActivate(UINT message, |
| 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. |
|
sky
2014/10/03 22:53:09
Document why we don't include transparent ones.
ananta
2014/10/04 00:10:09
Done.
|
| + // 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)) |
| + 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 |