feat: integrate native diagnostics and coordinated CBB transactions
This commit is contained in:
1 parent
9e230e1a46
commit
da67de026f
91 files changed
+14370
-435
No files matched your search
@@ -265,9 +265,23 @@ class WindowProbe:
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def capture(self, phase: DialogPhase) -> tuple[WindowSnapshot, ...]:
|
||||
def matches_identity(self, snapshot):
|
||||
try:
|
||||
return (self.win32gui.IsWindowVisible(snapshot.hwnd)
|
||||
and self.win32process.GetWindowThreadProcessId(snapshot.hwnd)[1] == snapshot.pid
|
||||
and self.win32gui.GetClassName(snapshot.hwnd) == snapshot.window_class)
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
def capture(self, phase: DialogPhase, *, pids=None) -> tuple[WindowSnapshot, ...]:
|
||||
snapshots = []
|
||||
for hwnd in self._handles():
|
||||
if pids is not None:
|
||||
try:
|
||||
if self.win32process.GetWindowThreadProcessId(hwnd)[1] not in pids:
|
||||
continue
|
||||
except Exception:
|
||||
continue
|
||||
try:
|
||||
window_class = str(self.win32gui.GetClassName(hwnd) or "")
|
||||
except Exception:
|
||||
|
||||
Reference in new issue
Block a user