I'm trying to make calculator with tauri but the problem with window vibrancy having square corners.
I tried to change hRgnBlur argument and also I came across this post but couldn't do it in rust. I tried CreateRoundRectRgn and SetWindowRgn but got big white borders around the window
let hdc: HDC = HDC::default();
BeginPath(hdc);
AngleArc(hdc, 0, 0, 20, 0.0, 0.0);
EndPath(hdc);
let bb = DWM_BLURBEHIND {
dwFlags: 1,
fEnable: true.into(),
hRgnBlur: PathToRegion(hdc),
fTransitionOnMaximized: true.into(),
};
let _ = DwmEnableBlurBehindWindow(hwnd, &bb);
Its not supported (DwmEnableBlurBehindWindow
) in windows 10 only 7/Vista. I Used both of DwmEnableBlurBehindWindow
and SetWindowCompositionAttribute
but DwmEnableBlurBehindWindow
seemed to not doing the blur. Sadly there is no option to customize the region.