From b5bdd26a45d292aa37dcf581f81d8f71a1a3d7af Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 5 Apr 2022 09:42:45 -0700 Subject: [PATCH] Revert "fix: some frameless windows showing a frame on Windows (#32692)" (#33610) This reverts commit 7c701367c0820691e2a0f8f1cfd1fb3470071704. Co-authored-by: Samuel Attard --- shell/browser/native_window_views.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 84c5de07b7ab4..ea24660945d27 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -339,14 +339,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); }