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 52225 - Sort by workspace, then by launch time
Sort by workspace, then by launch time
Status: RESOLVED OBSOLETE
Product: libwnck
Classification: Core
Component: general
git master
Other other
: High normal
: GNOME2.x
Assigned To: libwnck maintainers
libwnck maintainers
: 86185 95233 114365 123520 155874 169239 452350 (view as bug list)
Depends on:
Blocks: 155904 155905
 
 
Reported: 2001-03-17 19:29 UTC by nitro
Modified: 2018-01-24 13:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Fix ordering of windows in tasklist (2.57 KB, patch)
2005-01-14 05:39 UTC, Elijah Newren
needs-work Details | Review
store a sort key in the WnckWindow (8.89 KB, patch)
2005-01-22 20:14 UTC, Elijah Newren
committed Details | Review

Description nitro 2001-03-17 19:29:33 UTC
Package: gnome-core
Severity: normal
Version: 1.3.0
Synopsis: tasklist applet sorting
Bugzilla-Product: gnome-core
Bugzilla-Component: tasklist

Description:
The tasklist applet currently sorts by the name of the task.  This is highly unintuitive,
since I expect the tasklist to act like a stack.  There should be an option to choose
how the tasklist sorts the tasks:

- No sorting (act like a stack)
- Sort by task name

I think this can be independent of grouping.




------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-03-17 14:29 -------

The original reporter (nitro@puma.localdomain) of this bug does not have an account here.
Reassigning to the exporter, unknown@bugzilla.gnome.org.
Reassigning to the default owner of the component, andersca@gnu.org.

Comment 1 Nicolas Marchildon 2001-08-14 23:37:44 UTC
As people might also want a sorted list, the user should be able to
select whether or not the list is sorted or not.
Comment 2 Kjartan Maraas 2002-03-16 22:18:16 UTC
-> gnome-panel
Comment 3 Mark McLoughlin 2002-03-20 17:42:47 UTC
Okay, so they're sorted in libwnck, so we yould need the option there.
Moving to libwnck because havoc is better at coming up with reasons
why options like this are a bad idea :-)
Comment 4 Havoc Pennington 2002-03-24 02:42:19 UTC
I originally intended it to work like a stack 
(the order that wnck_screen_get_windows() returns the windows 
will make it work this way). 

It's currently sorted in an arbitrary but fixed order, the 
only feature of the current order is that windows 
in the same app appear next to each other, and the order 
does not change over time.

I don't think it should be an option, it should just be whatever 
user-tests best, or whatever Windows does, or some other reasonable
default. To make it an option we'd need evidence that for some 
subset of users the default is significantly problematic or less good
than an alternative.

UI team input welcome.
Comment 5 Havoc Pennington 2002-09-16 20:27:39 UTC
Any UI team input?
Comment 6 Havoc Pennington 2002-09-17 16:35:46 UTC
*** Bug 86185 has been marked as a duplicate of this bug. ***
Comment 7 Havoc Pennington 2002-09-17 16:36:16 UTC
#86185 has additional suggestions to look at
Comment 8 Anna Marie Dirks 2002-09-17 16:57:07 UTC
Oh, I like the suggestion on #86185 (group by workspace, and by
startup-time within a workspace). Unlike other suggestions, it is:

a) not configurable (which in my mind is a bonus; making it
configurable sounds to me like treating the symptoms, not the problem
itself) 

b) simply, visibly mapped to a familiar concrete concept (workspaces) 

For whatever my blessing is worth, I give it for this idea. If you'd
like, Havoc, make a patch to have the task list work like this, and
I'll run it through my testing lab at Ximian. 
Comment 9 Calum Benson 2002-09-18 17:45:03 UTC
Yeah, I kind of like the sound of that too.  IIRC the Windoze task
list orders from left-right (or top-bottom) in the order that windows
were opened as well... of course it doesn't have workspaces so I can't
comment on how it handles those :)
Comment 10 Havoc Pennington 2002-10-10 14:43:23 UTC
*** Bug 95233 has been marked as a duplicate of this bug. ***
Comment 11 Elijah Newren 2004-10-06 20:08:05 UTC
*** Bug 114365 has been marked as a duplicate of this bug. ***
Comment 12 Elijah Newren 2004-10-06 20:09:05 UTC
*** Bug 123520 has been marked as a duplicate of this bug. ***
Comment 13 Elijah Newren 2004-10-06 20:10:14 UTC
See also bug 143785.
Comment 14 Elijah Newren 2004-10-06 20:13:02 UTC
It looks like all dups are asking for order of creation as well, FWIW.  Bug
143785 is a little different in that it requests allow users to be able to
easily move the tasks around in the list (similar to tab reordering in epiphany).
Comment 15 Elijah Newren 2004-10-19 19:30:44 UTC
*** Bug 155874 has been marked as a duplicate of this bug. ***
Comment 16 Elijah Newren 2004-10-19 19:38:00 UTC
It may be worth considering using most-recently-used ordering (which can be
accomplished via the _NET_WM_USER_TIME property).

Advantages:
  - It would also the current buggy grouping method to be disposed of and
    replaced by grouping the LRU (least recently used) windows.  (See also bug
    59692)
  - It allows the user to be able to know exactly how many times they have to
    hit tab with the alt-tab popup to change to a given window
  - New windows with DEMANDS_ATTENTION set would be first in the tasklist,
    making them easier to notice (since DEMANDS_ATTENTION windows always
    appear at the front)
Possible Disadvantage:
  - The tasklist order would by dynamic instead of static.

Either way, both ordered-by-launch-time and ordered-by-most-recently-used time
would be a lot better than the current method.
Comment 17 Elijah Newren 2004-10-20 17:06:02 UTC
Federico pointed out the following on desktop-devel-list:

  A well-known Windows developer says they considered an MRU order for the
  Windows task bar, but people found it confusing that the order changed:
 
  http://weblogs.asp.net/oldnewthing/archive/2004/04/08/109775.aspx#110379

So, perhaps my idea wasn't so great after all.  :/  I guess that leaves
ordered-by-launch-time...
Comment 18 Havoc Pennington 2004-10-26 17:33:06 UTC
Order by launch time shouldn't need to use USER_TIME because one of the lists of
windows set on the root window by the WM is defined to be in map order IIRC.
Comment 19 Elijah Newren 2004-10-29 14:36:09 UTC
Yeah, you're right.  _NET_CLIENT_LIST is defined to have initial mapping order
according to the EWMH.  Cool.
Comment 20 Rejk Intas 2004-11-18 22:43:19 UTC
Hello all,

Is there a patch which can be applied for the mentioned issue? I cannot find it.
Can you please provide me a link?

Thank you very much.
Comment 21 Benjamin Kahn 2004-11-19 16:34:49 UTC
No.  As far as I know, no patch for this exists.  (It certainly isn't referenced
in this bug anyway.)
Comment 22 Kjartan Maraas 2005-01-03 15:35:35 UTC
Changing version
Comment 23 Elijah Newren 2005-01-14 05:38:08 UTC
Wow, no wonder everyone kept requesting this.  I just coded it up, and it's
really nice.  :)

My patch doesn't try to fix window grouping (as far as I'm concerned, it's
unfixable; there's tons of bugs on it and I don't even know anything that sounds
like sane behavior), so I just punt and group windows the same as currently (and
turn off grouping on my machine, as always).

There is one thing that needs mentioning and fixing besides just mapping order,
though.  Current, libwnck sets things up in two rows (if possible), and orders
windows from left to right on the first row and then left to right on the
second.  Thus, we get an order like this:
   a  b  c
   d  e  f
But this sucks because new windows are added to a new column, which results in
big reshuffling.  In this example, if we add a new window, the location of d
changes drastically:
   a  b  c  d
   e  f  g
So, I instead order things like this:
   a  c  e
   b  d  f
And when a new window is added, we get:
   a  c  e  g
   b  d  f

Since things go by mapping order (with the patch), one knows exactly where each
window in the tasklist is and can remember it instead of searching for it. 
Anyway, I'll attach the patch in a minute.
Comment 24 Elijah Newren 2005-01-14 05:39:39 UTC
Created attachment 35996 [details] [review]
Fix ordering of windows in tasklist
Comment 25 Havoc Pennington 2005-01-15 03:20:29 UTC
Comment on attachment 35996 [details] [review]
Fix ordering of windows in tasklist

g_list_position (window_list, 
+			       g_list_find (window_list, task1->window));

seems pretty crazy-slow to have in a sort function that could be called over
and over.

pos1 == pos2 is more of a g_assert (pos1 != pos2) type thing isn't it?

Looks fine otherwise. Maybe WnckScreen could just store a sort key  in the
WnckWindow... ? this should be a pretty simple matter of ensuring each new
window appended has a key higher than the previous window right?
Comment 26 Elijah Newren 2005-01-22 20:14:27 UTC
Created attachment 36386 [details] [review]
store a sort key in the WnckWindow

Wow, I didn't know wnck_task_compare was called so many times.	For some
reason, I was thinking that it would only be called when a new window was
created or destroyed (I forgot about window grouping and so I figured that'd be
the only need to rearrange the tasks in the list), and was surprised to see it
called upon something as simple as a focus change.  So, yeah, this patch gets
rid of the list searches.

So, now windows are created with a sort key and that sort key is just
incremented with each new window.  The only trick is that I need new windows
added in mapping order instead of stacking order (which required several small
changes in update_client_list) so that if wnck-applet crashes and is restarted
then the task order doesn't change.  This is probably not really that important
for most users since it shouldn't crash, but is nice for those who might want
to write patches for libwnck or gnome-panel and thus manually restart them. 
;-)

Also, pos1 == pos2 wasn't more of a g_assert (pos1 != pos2) type thing.  It can
and will happen whenever the user has two applications that are starting up but
haven't been mapped yet.  Since you asked about it, though, I added a
clarifying comment in this version of the patch.
Comment 27 Havoc Pennington 2005-01-22 20:55:22 UTC
Comment on attachment 36386 [details] [review]
store a sort key in the WnckWindow

Looks good to me.
Comment 28 Elijah Newren 2005-01-22 21:06:51 UTC
committed.
Comment 29 Olav Vitters 2005-03-04 21:07:13 UTC
*** Bug 169239 has been marked as a duplicate of this bug. ***
Comment 30 Oded Arbel 2007-11-08 12:29:15 UTC
Sorry for raising old issues, but I don't like the current method of sorting according to lunch time - its slightly better then arbitrary sorting, but not by much. I would really love to see a workspace grouping like suggested in bug #86185 and comment #8. 

I apologize ahead of time for mentioning forbidden words in the GNOME bugzilla, but my previous desktop was KDE which orders the task list just like that - order by workspace and lunch time in each workspace group. I understand that many people don't use "show windows from all workspaces", but with that setting enabled order by lunch time alone is very confusing - much more confusing then inserting new tasks in the middle. 

A simple example of the problem is like this: I usually put windows on workspaces according to the task they are used for (I understand this method is quite common) all mail goes on workspace 1, web is on 4, 3 is for terminals, 2 is for development and 5 is for office documents. File browsing and miscellaneous stuff usually go on workspace 6 but sometimes on other workspaces. 

Use case 1 deals with having a lot of short lived windows - I start working on a new email (or a few - I sometimes have more then one mail composer open, started at different times) it goes on workspace 1 but its task list entry could be anywhere. I usually have several new windows open to deal with a new email - file browsers, documents, maybe an image viewer/editor or few - its a real problem when I have several composers open and when I want to jump to one of them I have to scan the entire task list (usually with many similar icons) instead of focusing in one region where I know all my composers are (unlike looking for things on the workspace, I know where workspace 1 is, I don't need to look). The case with file browser windows that can be on any workspace is even more problematic - a file browser is on a specific workspace (and not the last) because its related to some task I'm doing on that workspace, so a file browser used to find something to attach to an email will usually be on the first workspace, but the task list doesn't hint at that - its just one file browser of many on the task bar and I have no idea where to look for.

Use case 2 deals with long running applications: I always have one long running application to fulfill any of the 4 major tasks - email, development, terminal and web. If the tasks list was ordered by workspace, I would know immediately where about I would find my long running application: Evolution would be the most to the left, and Firefox would be the most to the right. But because these applications crash from time to time (especially Evolution and Firefox) and need to be restarted, the lunch time ordering of the task list shuffles them all over the place.

I understand that there are several people that like lunch time based ordering, because it fits better with stack based task management (new tasks need to be completed before old tasks can be resumed), but such ordering wrecks havoc (no pun intended) with spatial based task management (several tasks are being worked on at any single time and workspaces are used to arrange tasks). For this specific feature I think that the approach of choosing a sane default and preventing customization fails because different people work best using different methodologies and optimizing the task list for one methodology to the detriment of other methodologies is not the right thing to do.

Specifically for me, I don't mind if the customization is only available as a gconf setting, or even a different task list applet that needs to be installed instead of the default one - because I wouldn't mind doing that to get a much better (for me) behavior, but I think that adding another checkbox under the "show windows from all workspaces" radio button in the task list preference dialog (that is of course disabled until "all workspaces" is selected) wouldn't be much of a problem usability wise.
Comment 31 Elijah Newren 2007-11-09 22:06:43 UTC
(In reply to comment #30)
> Sorry for raising old issues, but I don't like the current method of sorting
> according to lunch time - its slightly better then arbitrary sorting, but not
> by much. I would really love to see a workspace grouping like suggested in bug
> #86185 and comment #8. 

Don't we have a separate open bug for that somewhere?  I had intended that we implement that part at some point too, but thought we had a separate bug for it somewhere...

Could someone do a search, and then feel free to reopen this bug if there isn't such a bug?
Comment 32 Oded Arbel 2007-11-10 13:22:41 UTC
I did search for it - that was bug #86185, which was closed as a duplicate of this one.
Comment 33 Elijah Newren 2007-11-10 15:20:25 UTC
*** Bug 452350 has been marked as a duplicate of this bug. ***
Comment 34 GNOME Infrastructure Team 2018-01-24 13:10:36 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libwnck/issues/2.