shell-app-usage: fix tracking code

We were checking if the app was running, but then marking it as
recently-seen either way. Fix it to only update it when the app is
running.

https://bugzilla.gnome.org/show_bug.cgi?id=640447
This commit is contained in:
Dan Winship 2011-01-24 13:25:09 -05:00
parent 6f070319a0
commit 4cb967f3ac

View File

@ -324,6 +324,7 @@ on_app_state_changed (ShellWindowTracker *tracker,
running = shell_app_get_state (app) == SHELL_APP_STATE_RUNNING; running = shell_app_get_state (app) == SHELL_APP_STATE_RUNNING;
if (running)
usage->last_seen = get_time (); usage->last_seen = get_time ();
} }