diff options
Diffstat (limited to '')
| -rwxr-xr-x | src/Watcher/get_windows.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/Watcher/get_windows.py b/src/Watcher/get_windows.py index 0769eb9..008defa 100755 --- a/src/Watcher/get_windows.py +++ b/src/Watcher/get_windows.py @@ -42,18 +42,10 @@ def active_window(): return active_window # returns true if user has move to next app which is not the same as previous -def is_window_changed(a, afk, timeout): - result = False - while not(result): - time.sleep(0.5) - b = active_window() - if a != b : - result = True - elif get_afk_status(afk, timeout): - result = True - else: - result = False - return result +def previous_window(array_of_window, active_window): + array_of_window.remove(active_window) + array_of_window.append(active_window) + return l[-2] ### what to do after window get change I've to append one line in csv data file in following format |
