Skip to content

Commit c8ee08d

Browse files
committed
minor app filtering optimizations
1 parent 996d95b commit c8ee08d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/core/logic/app_tracker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
if os.name == 'nt':
77
from pywinauto import Desktop
88
from pywinauto.findwindows import ElementNotFoundError
9+
windows = Desktop(backend="uia").windows()
910
elif sys.platform == 'darwin':
1011
import AppKit
1112

@@ -118,15 +119,14 @@ def _update_excluded_apps(self):
118119
pass
119120

120121
#print(f"\nExcluded app PIDs: {EXCLUDED_APP_PIDS}") # Debugging line
121-
#print(f"New exlusions: {i}")
122+
print(f"New exlusions: {i}")
122123
data = {'excluded_app_pids': EXCLUDED_APP_PIDS}
123124
write_file(apps_file(), data)
124125

125126
def _has_gui(self, process_id):
126127
if os.name == 'nt':
127128
try:
128129
# Enumerate all top-level windows
129-
windows = Desktop(backend="uia").windows()
130130
for win in windows:
131131
if win.process_id() == process_id:
132132
# Found a visible window for this process

0 commit comments

Comments
 (0)