From 6561311f4cb8275fc8dd85592840bb4a8e6ee6d3 Mon Sep 17 00:00:00 2001 From: jackhou Date: Tue, 30 Sep 2014 19:34:15 -0700 Subject: [PATCH] [Win] Only update HWND styles on SizeConstraintsChanged for normal windows. An earlier CL added SizeConstraintsChanged which updates the HWND's style flags: https://codereview.chromium.org/581953002/ To be consistent with CalculateWindowStylesFromInitParams in widget_hwnd_utils, it should only set the style on normal windows. BUG=417986 Review URL: https://codereview.chromium.org/611223002 Cr-Commit-Position: refs/heads/master@{#297582} --- ui/views/win/hwnd_message_handler.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc index 36003484d1670..ae24d047e5c7b 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -870,6 +870,10 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { void HWNDMessageHandler::SizeConstraintsChanged() { LONG style = GetWindowLong(hwnd(), GWL_STYLE); + // Ignore if this is not a standard window. + if (!(style & WS_OVERLAPPED)) + return; + if (delegate_->CanResize()) { style |= WS_THICKFRAME | WS_MAXIMIZEBOX; if (!delegate_->CanMaximize())