Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 1630873003: Remove code for losing activation when child window activated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0cacffe4a76dfdde167943bf1f232f87736b9a76..f28f1dcfbb741d1333da57dc4066f796964153ca 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698