Skip to content

Commit

Permalink
use hasWindowChanged method (lib)
Browse files Browse the repository at this point in the history
  • Loading branch information
skel35 committed Oct 27, 2020
1 parent 659640f commit 6a907a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/window_change_recorder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ void WindowChangeRecorder::inspectFocusedWindow() {
last_autotracker_title_ = "";
}

if (!idleChanged && !hasWindowChanged(title, filename)) {
bool windowHasChanged = hasWindowChanged(title, filename);
if (!idleChanged && !windowHasChanged) {
return;
}

// Lite version of timeline recorder
// Since we don't have Screen Recording permission yet => title will be empty
// So we only track the primary timeline (treat title is filename)
if (is_catalina_OSX && last_title_ == title && last_filename_ == filename) {
if (is_catalina_OSX && !windowHasChanged) {
return;
}

Expand Down

0 comments on commit 6a907a8

Please sign in to comment.