mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 22:01:47 +03:00
feat: calling extendframe function to get sheet of glass effect
This commit is contained in:
parent
c4145a464b
commit
08e9be0df3
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user