diff --git a/src/ui/win_dwm.py b/src/ui/win_dwm.py new file mode 100644 index 0000000..9cceb33 --- /dev/null +++ b/src/ui/win_dwm.py @@ -0,0 +1,12 @@ +import ctypes +from sys import platform + +def enable_blur_behind(hwnd: int) -> None: + """Force DWM à activer la composition derrière la fenêtre.""" + if not platform.startswith('win'): + return + try: + margins = (ctypes.c_int * 4)(-1, -1, -1, -1) + ctypes.windll.dwmapi.DwmExtendFrameIntoClientArea(hwnd, ctypes.byref(margins)) + except Exception: + pass # Silencieux si DWM indisponible