From 89af06b24cbbe44b2e9b291af2fcd347218b908b Mon Sep 17 00:00:00 2001 From: Xarkam Date: Tue, 24 Mar 2026 13:29:26 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20tool=20box=20pour=20utiliser=20?= =?UTF-8?q?dwm=20car=20r=C3=A9gression=20dans=20pyside=206.11.=20Pour=20le?= =?UTF-8?q?=20moment=20rester=20sur=20pyside=206.10.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/win_dwm.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/ui/win_dwm.py 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