From a23c93a6a0080c3192fb4356ad273a8dfcfbff55 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 15:11:31 +0100 Subject: [PATCH] fix: some frameless windows showing a frame on Windows (#32707) Co-authored-by: Shelley Vohr --- shell/browser/native_window_views.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 12bc33fca5240..b9f88bea5a6c6 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -330,15 +330,14 @@ 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_) + if (resizable_ && thick_frame_) frame_style |= WS_THICKFRAME; if (minimizable_) frame_style |= WS_MINIMIZEBOX; if (maximizable_) frame_style |= WS_MAXIMIZEBOX; - // We should not show a frame for transparent window. - if (!thick_frame_) - frame_style &= ~(WS_THICKFRAME | WS_CAPTION); + if (!thick_frame_ || !has_frame()) + frame_style &= ~WS_CAPTION; ::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, frame_style); }