1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-19 02:37:51 +03:00

feat: calling extendframe function to get sheet of glass effect

This commit is contained in:
kingavatar 2023-04-17 16:38:26 +05:30 committed by Wez Furlong
parent c4145a464b
commit 08e9be0df3
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -1287,7 +1287,8 @@ fn apply_theme(hwnd: HWND) -> Option<LRESULT> {
// 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<LRESULT> {
);
};
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();