Skip to content

Commit

Permalink
more logging about fullscreen hwnds
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Nov 15, 2022
1 parent 1c063f9 commit b02d723
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions elevenclock/tools.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from ctypes import c_int, windll
import json
import time
from turtle import isvisible
windll.shcore.SetProcessDpiAwareness(c_int(2))

from versions import *
Expand Down Expand Up @@ -744,12 +743,12 @@ def verifyHwndValidity(hwnd):
pass
if pHandle != 0:
pname = win32process.GetModuleFileNameEx(pHandle, 0)
if pname.endswith("\\TextInputHost.exe"):
if str(pname).lower().endswith("textinputhost.exe"):
globals.cachedInputHosts.append(hwnd)
print(f"🟡 Blacklisted hwnd {hwnd} under title {win32gui.GetWindowText(hwnd)}")
print(f"🟡 Blacklisted hwnd {hwnd} under title {win32gui.GetWindowText(hwnd)} (Process name is {str(pname).lower()})")
else:
globals.notTextInputHost.append(hwnd)
print(f"🟢 Hwnd {hwnd} under title {win32gui.GetWindowText(hwnd)} was verified as a valid window")
print(f"🟢 Hwnd {hwnd} under title {win32gui.GetWindowText(hwnd)} was verified as a valid window (Process name is {str(pname).lower()})")

def appendWindowList(hwnd, _):
rect = win32gui.GetWindowRect(hwnd)
Expand Down

0 comments on commit b02d723

Please sign in to comment.