From a007eb0d68437ad24f10bc1496eef61ff0824cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Sun, 22 Dec 2024 14:57:56 +0800 Subject: [PATCH] . --- py/LunaTranslator/rendertext/webview.py | 2 +- py/LunaTranslator/windows.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/py/LunaTranslator/rendertext/webview.py b/py/LunaTranslator/rendertext/webview.py index 64faca6e..c69aaf47 100644 --- a/py/LunaTranslator/rendertext/webview.py +++ b/py/LunaTranslator/rendertext/webview.py @@ -117,7 +117,7 @@ class TextBrowser(QWidget, dataget): # 而且SetCapture后会立即被父窗口把capture夺走,无法后面的释放&移动,所以只能开个线程来弄 if not self.selectable: self.trackingthread() - return windows.WNDPROCTYPE(orig)(hwnd, msg, wp, lp) + return windows.WNDPROCTYPE_1(orig)(hwnd, msg, wp, lp) @tryprint def showEvent(self, e): diff --git a/py/LunaTranslator/windows.py b/py/LunaTranslator/windows.py index 5bfd9e1b..b1fce0a2 100644 --- a/py/LunaTranslator/windows.py +++ b/py/LunaTranslator/windows.py @@ -861,6 +861,7 @@ IsZoomed.argtypes = (HWND,) IsZoomed.restype = BOOL WNDPROCTYPE = WINFUNCTYPE(INT, HWND, INT, WPARAM, LPARAM) +WNDPROCTYPE_1 = CFUNCTYPE(INT, HWND, INT, WPARAM, LPARAM) GWLP_WNDPROC = -4 if sizeof(c_void_p) == 8: