Fix invisible overlay blocking mouse clicks

This commit is contained in:
2026-01-24 17:51:23 +02:00
parent 5087eec958
commit de64610a90
2 changed files with 45 additions and 7 deletions

View File

@@ -65,6 +65,10 @@ class WindowHook:
# (Window 420x140, Pill 380x100)
self.logical_rect = [20, 20, 20+380, 20+100]
self.current_scale = initial_scale
self.enabled = True # New flag
def set_enabled(self, enabled):
self.enabled = enabled
def install(self):
proc_address = ctypes.cast(self.new_wnd_proc, ctypes.c_void_p)
@@ -73,6 +77,10 @@ class WindowHook:
def wnd_proc_callback(self, hwnd, msg, wParam, lParam):
try:
if msg == WM_NCHITTEST:
# If disabled (invisible/inactive), let clicks pass through (HTTRANSPARENT)
if not self.enabled:
return HTTRANSPARENT
res = self.on_nchittest(lParam)
if res != 0:
return res