[gnome-shell] shell-app-usage: fix tracking code



commit 4cb967f3acee4752b06ac655c0e15cfe7638273c
Author: Dan Winship <danw gnome org>
Date:   Mon Jan 24 13:25:09 2011 -0500

    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

 src/shell-app-usage.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/shell-app-usage.c b/src/shell-app-usage.c
index 6126dc0..e8fe3ae 100644
--- a/src/shell-app-usage.c
+++ b/src/shell-app-usage.c
@@ -324,7 +324,8 @@ on_app_state_changed (ShellWindowTracker *tracker,
 
   running = shell_app_get_state (app) == SHELL_APP_STATE_RUNNING;
 
-  usage->last_seen = get_time ();
+  if (running)
+    usage->last_seen = get_time ();
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]