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}
(cherry picked from commit 6561311)

[email protected]

Review URL: https://codereview.chromium.org/625793002

Cr-Commit-Position: refs/branch-heads/2171@{#40}
Cr-Branched-From: 267aeeb-refs/heads/master@{#297060}
  • Loading branch information
Jack Hou committed Oct 3, 2014
1 parent 315383f commit 732b4cc
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 732b4cc

Please sign in to comment.