From 8e03e1d4a967585623a4696ad1587469371089ec Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:57:00 -0500 Subject: [PATCH] chore: fix textured window conditional on macOS (#44767) Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- shell/browser/native_window_mac.mm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 45eef7e744f8..2458820df370 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -167,11 +167,6 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options, if (!rounded_corner && !has_frame()) styleMask = NSWindowStyleMaskBorderless; -// TODO: remove NSWindowStyleMaskTexturedBackground. -// https://github.com/electron/electron/issues/43125 -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (minimizable) styleMask |= NSWindowStyleMaskMiniaturizable; if (closable) @@ -179,9 +174,11 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options, if (resizable) styleMask |= NSWindowStyleMaskResizable; +// TODO: remove NSWindowStyleMaskTexturedBackground. +// https://github.com/electron/electron/issues/43125 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (windowType == "textured" || transparent() || !has_frame()) { + if (windowType == "textured" && (transparent() || !has_frame())) { util::EmitWarning( "The 'textured' window type is deprecated and will be removed", "DeprecationWarning"); @@ -189,9 +186,6 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options, } #pragma clang diagnostic pop -// -Wdeprecated-declarations -#pragma clang diagnostic pop - // Create views::Widget and assign window_ with it. // TODO(zcbenz): Get rid of the window_ in future. views::Widget::InitParams params(