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

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

Issue 1645843002: Force a frame changed message (WM_NCCALCSIZE) to occur during settings change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove newline 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..aca31b8caa87c73cb301cde5480e5b02e69ecec4 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1330,6 +1330,8 @@ void HWNDMessageHandler::OnDestroy() {
void HWNDMessageHandler::OnDisplayChange(UINT bits_per_pixel,
const gfx::Size& screen_size) {
delegate_->HandleDisplayChange();
+ // Force a WM_NCCALCSIZE to occur to ensure that we handle auto hide
+ // taskbars correctly.
SendFrameChanged();
}
@@ -1988,6 +1990,13 @@ void HWNDMessageHandler::OnSettingChange(UINT flags, const wchar_t* section) {
delegate_->HandleWorkAreaChanged();
SetMsgHandled(FALSE);
}
+
+ // If the work area is changing, then it could be as a result of the taskbar
+ // broadcasting the WM_SETTINGCHANGE message due to changes in auto hide
+ // settings, etc. Force a WM_NCCALCSIZE to occur to ensure that we handle
+ // this correctly.
+ if (flags == SPI_SETWORKAREA)
+ SendFrameChanged();
}
void HWNDMessageHandler::OnSize(UINT param, const gfx::Size& size) {
« 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