From 76bee2443ac60cb50200930692d0152cca54c08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 28 Aug 2024 15:03:59 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/textsource/texthook.py | 1 + 1 file changed, 1 insertion(+) diff --git a/LunaTranslator/LunaTranslator/textsource/texthook.py b/LunaTranslator/LunaTranslator/textsource/texthook.py index f9a4f8ce..90a02215 100644 --- a/LunaTranslator/LunaTranslator/textsource/texthook.py +++ b/LunaTranslator/LunaTranslator/textsource/texthook.py @@ -362,6 +362,7 @@ class texthook(basetext): while (not self.ending) and (len(self.pids) == 0): try: hwnd = windows.GetForegroundWindow() + hwnd = windows.GetAncestor(hwnd) if self.connecthwnd(hwnd): break except: