After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618378 - [ShellApp] Rework compare to take into account closed windows
[ShellApp] Rework compare to take into account closed windows
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-05-11 15:57 UTC by Colin Walters
Modified: 2010-05-17 17:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[ShellApp] Rework compare to take into account closed windows (2.73 KB, patch)
2010-05-11 15:57 UTC, Colin Walters
reviewed Details | Review
[ShellApp] Rework compare to take into account closed windows (3.37 KB, patch)
2010-05-11 17:45 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2010-05-11 15:57:31 UTC
The API docs for ShellApp claimed it sorted by the last time the
user interacted with the app, but if one closed a window, then
we would fall back to comparing against a possibly much older
timestamp from another window.  Fix this by just keeping a
user time per app.

Also clean up the comparison function to explicitly check the state
instead of deferring to the window list.
Comment 1 Colin Walters 2010-05-11 15:57:33 UTC
Created attachment 160828 [details] [review]
[ShellApp] Rework compare to take into account closed windows
Comment 2 Dan Winship 2010-05-11 16:14:27 UTC
Comment on attachment 160828 [details] [review]
[ShellApp] Rework compare to take into account closed windows

should we initialize last_user_time somewhere (creation? startup notifictaion?) or is there guaranteed to be a user-time-changed event pretty quickly?
Comment 3 Colin Walters 2010-05-11 17:45:20 UTC
Created attachment 160839 [details] [review]
[ShellApp] Rework compare to take into account closed windows
Comment 4 Colin Walters 2010-05-11 17:49:50 UTC
This patch initializes user time when a window is first added.