Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Win] Only update HWND styles on SizeConstraintsChanged for normal wi…
Browse files Browse the repository at this point in the history
…ndows.

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}
  • Loading branch information
jackhou-chromium authored and Commit bot committed Oct 1, 2014
1 parent 552a9a1 commit 6561311
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/views/win/hwnd_message_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 6561311

Please sign in to comment.