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

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

Issue 1707233002: Reduce the fullscreen window height by 1px on activation loss. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 f632827ca29663e93365929d151c4c1c5add9d49..946a3d9c1d3af4eb2ebfc126eb00cdb8670d3caa 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -929,7 +929,8 @@ LRESULT HWNDMessageHandler::OnWndProc(UINT message,
}
if (message == WM_ACTIVATE && IsTopLevelWindow(window))
sky 2016/02/18 17:18:47 nit: add {} now
- PostProcessActivateMessage(LOWORD(w_param), !!HIWORD(w_param));
+ PostProcessActivateMessage(LOWORD(w_param), !!HIWORD(w_param),
+ reinterpret_cast<HWND>(l_param));
return result;
}
@@ -1027,12 +1028,16 @@ void HWNDMessageHandler::SetInitialFocus() {
}
}
-void HWNDMessageHandler::PostProcessActivateMessage(int activation_state,
- bool minimized) {
+void HWNDMessageHandler::PostProcessActivateMessage(
+ int activation_state,
+ bool minimized,
+ HWND window_gaining_or_losing_activation) {
DCHECK(IsTopLevelWindow(hwnd()));
const bool active = activation_state != WA_INACTIVE && !minimized;
- if (delegate_->CanActivate())
- delegate_->HandleActivationChanged(active);
+ if (delegate_->CanActivate()) {
+ delegate_->HandleActivationChanged(active,
+ window_gaining_or_losing_activation);
+ }
}
void HWNDMessageHandler::RestoreEnabledIfNecessary() {

Powered by Google App Engine
This is Rietveld 408576698