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: