From d9455a45feff01323384a399f836adeffd09ab11 Mon Sep 17 00:00:00 2001 From: Kushagra Gupta Date: Thu, 2 May 2024 05:51:00 +0530 Subject: [PATCH] fixed the issue #5348 and a typo Fixed the issue #5348 for windows by setting margins check for window decoration instead and using value 0 margin for only the TITLE style --- window/src/os/windows/window.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/window/src/os/windows/window.rs b/window/src/os/windows/window.rs index b38479c37..bbeffb845 100644 --- a/window/src/os/windows/window.rs +++ b/window/src/os/windows/window.rs @@ -1424,7 +1424,7 @@ fn apply_theme(hwnd: HWND) -> Option { if let Some(inner) = rc_from_hwnd(hwnd) { let mut inner = inner.borrow_mut(); - // Set Arylic or Mica system Backdrop + // Set Acrylic or Mica system Backdrop let pv_attribute = match inner.config.win32_system_backdrop { SystemBackdrop::Auto => DWM_SYSTEMBACKDROP_TYPE::DWMSBT_AUTO, SystemBackdrop::Disable => DWM_SYSTEMBACKDROP_TYPE::DWMSBT_NONE, @@ -1433,9 +1433,9 @@ fn apply_theme(hwnd: HWND) -> Option { SystemBackdrop::Tabbed => DWM_SYSTEMBACKDROP_TYPE::DWMSBT_TABBEDWINDOW, }; - let margins = match inner.config.win32_system_backdrop { - SystemBackdrop::Auto | SystemBackdrop::Disable => 0, - SystemBackdrop::Acrylic | SystemBackdrop::Mica | SystemBackdrop::Tabbed => -1, + let margins = match inner.config.window_decorations { + WindowDecorations::TITLE => -1, + _ => 0, }; DwmExtendFrameIntoClientArea(