Skip to content

Commit

Permalink
revert: some frameless windows showing a frame on Windows (#33608)
Browse files Browse the repository at this point in the history
Revert "fix: some frameless windows showing a frame on Windows (#32692)"

This reverts commit 7c70136.

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
  • Loading branch information
trop[bot] and MarshallOfSound committed May 19, 2022
1 parent d5ba5c8 commit 37558a6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions shell/browser/native_window_views.cc
Expand Up @@ -321,14 +321,15 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
// Set Window style so that we get a minimize and maximize animation when
// frameless.
DWORD frame_style = WS_CAPTION | WS_OVERLAPPED;
if (resizable_ && thick_frame_)
if (resizable_)
frame_style |= WS_THICKFRAME;
if (minimizable_)
frame_style |= WS_MINIMIZEBOX;
if (maximizable_)
frame_style |= WS_MAXIMIZEBOX;
if (!thick_frame_ || !has_frame())
frame_style &= ~WS_CAPTION;
// We should not show a frame for transparent window.
if (!thick_frame_)
frame_style &= ~(WS_THICKFRAME | WS_CAPTION);
::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, frame_style);
}

Expand Down

0 comments on commit 37558a6

Please sign in to comment.