From f1a4c864a5195a2a65fd25faf73e024bffed6fd3 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: Sun, 14 Apr 2024 22:56:27 +0800 Subject: [PATCH] ... --- LunaTranslator/LunaTranslator/myutils/hwnd.py | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/LunaTranslator/LunaTranslator/myutils/hwnd.py b/LunaTranslator/LunaTranslator/myutils/hwnd.py index 2b91824f..691a0ec9 100644 --- a/LunaTranslator/LunaTranslator/myutils/hwnd.py +++ b/LunaTranslator/LunaTranslator/myutils/hwnd.py @@ -91,26 +91,6 @@ def hwndscalerate(hwnd): return rate -def getpidhwndfirst(pid): - try: - hwnds = list() - - def get_all_hwnd(hwnd, _): - if ( - windows.IsWindow(hwnd) - and windows.IsWindowEnabled(hwnd) - and windows.IsWindowVisible(hwnd) - ): - if windows.GetWindowThreadProcessId(hwnd) == pid: - hwnds.append((hwnd)) - - windows.EnumWindows(get_all_hwnd, 0) - return hwnds[0] - except: - return 0 - - - def getprocesslist(): pids = windows.EnumProcesses()