diff --git a/window/src/os/windows/window.rs b/window/src/os/windows/window.rs index ce53fbba3..741731d48 100644 --- a/window/src/os/windows/window.rs +++ b/window/src/os/windows/window.rs @@ -1287,7 +1287,8 @@ fn apply_theme(hwnd: HWND) -> Option { // Check for OS app theme, and set window attributes accordingly. // Note that the MS terminal app uses the logic found here for this stuff: // https://github.com/microsoft/terminal/blob/9b92986b49bed8cc41fde4d6ef080921c41e6d9e/src/interactivity/win32/windowtheme.cpp#L62 - use winapi::um::dwmapi::DwmSetWindowAttribute; + use winapi::um::dwmapi::{DwmExtendFrameIntoClientArea, DwmSetWindowAttribute}; + use winapi::um::uxtheme::MARGINS; #[allow(non_snake_case)] type WINDOWCOMPOSITIONATTRIB = u32; @@ -1374,6 +1375,16 @@ fn apply_theme(hwnd: HWND) -> Option { ); }; + DwmExtendFrameIntoClientArea( + hwnd, + &MARGINS { + cxLeftWidth: -1, + cxRightWidth: -1, + cyTopHeight: -1, + cyBottomHeight: -1, + }, + ); + if let Some(inner) = rc_from_hwnd(hwnd) { let mut inner = inner.borrow_mut();