GNOME Bugzilla – Bug 171804
Window list grouped sorting
Last modified: 2018-01-24 13:26:56 UTC
The window list sorts items in the order they were opened. Seems reasonable. Now, when a large number of windows are opened, it starts grouping related items. If someone has enough windows open to cause grouping, they probably have a lot of windows. It might be better to sort alphabetically within the groups. For example, I tend to open dozens of xterms across many different hosts. I put the hostname in the window title, but even so, finding the one I want is tricky. Alphabetically sorting in general wouldn't be good because, for example, the user wouldn't know where to expect a new item to appear in the window list, but by grouping windows you're already breaking this ordering. Changing the order within the group wouldn't make much difference from this point of view. Other information:
*** Bug 53942 has been marked as a duplicate of this bug. ***
Created attachment 49691 [details] [review] that does the job i'm comparing with g_ascii_strcasecmp() beacause I don't find something like g_utf8_strcasecmp().
priority=high because of the patch
Xavier: I think you need to use g_utf8_collate().
Created attachment 50947 [details] [review] thanks Vincent done
Thanks Xavier. I committed a slightly modified version (there was a leak ;-)).
I turns out that this behaviour (sorting) is a real pain, because window titles change dynamically. My terminal title changes when I change directory (or perhaps if someone changes the topic in a text-based IRC client, or if I edit a file in an editor, or...). My Web browser window changes title if I switch tabs, or if the page reloads, or if there's JavaScript that sets the title. So now my windows move about in the grouped list, but not under my control, like wriggling maggots in a can, and I can't find the one I want. Worse, the only way I can find a browser tab that's not displayed is by remembering its position in the list. So now I have to go through all the windows until I find the one I need (or just open a new copy, which eventually crashes the browser). To make this work, it needs either to have a preference to enable/disable on a per-application basis (which I think is crack) or to number windows when created, or to let users edit the displayed title (also crack, but it would belong in the window manager). I've been trying to live with it, but it's really not working. I don't want to stop using gnome-terminal and tabbed browsing. I think it's best reverted. Liam
Reopening as per Liam's comments.
I'm very in favour of alphabetic sorting because I use the same apps most of the time and no matter in which order I open them, they always appear in the same order in the Tasklist. (XChat always last for example) From my understanding it would be necessary to find a sorting algorithm that sorts windows the same all the time. So it would be necesary to sort by an immutable (ideally across sessions) property. Are there any useful immutable properties that could be sorted on? The best I can come up with right now is the name of the executable that created the window.
I'm with Liam on this one. The order should be reverted to opening time, since IMHO it's the only sensible one. If I want to switch back to, say, the second Firefox window I opened, I expect to find it near the top of the window group list, etc. etc.
*** Bug 366752 has been marked as a duplicate of this bug. ***
In bug 366752, Elijah mentioned he would probably revert this.
It looks like both sortings are usefull depending on user approach. So to satisfy both groups it would be best to include both types and add option to switch between them (in gconf for start). From implementation point of view, if I understand it right, there is already working code for both sortings. What needs to be done is put both code pieces together in one revision and add code to decide acording to user setting which sorting will be used, right? I do not care which sorting will be set as default, as long as I can change it.:-)
(In reply to comment #13) > It looks like both sortings are usefull depending on user approach. So to > satisfy both groups it would be best to include both types and add option to > switch between them (in gconf for start). > From implementation point of view, if I understand it right, there is already > working code for both sortings. What needs to be done is put both code pieces > together in one revision and add code to decide acording to user setting which > sorting will be used, right? > I do not care which sorting will be set as default, as long as I can change > it.:-) > This sounds like exactly what I was asking for. If the selection can be done with a GUI, that's all the better. Otherwise I can settle for writing a value in some configuration file, as long as I don't have to recompile the actual Gnome Panel sources.
So, has the ability to NOT sort alphabetically been added in any way? I just tried booting Gutsy (and I'm not sure how to tell which of the various patches to this might be in that release), and it has the following behavior: (a) No grouping, unless I find the relevant UI switch and throw it. I can live with that, by leaving the switch thrown. (I don't recall the name of that switch, since I booted a LiveCD a few days ago when I was playing with this.) (b) Windows are STILL sorted alphabetically! And I can't find any way to turn this off. I've been waiting for this alphabetical-sorting to be reverted for about two years now (it was okay in Hoary, and all Ubuntu releases since then have had the involuntary sorting), and I'd really love to stop waiting... Thanks!
yep... now in Ubuntu Hardy, I decided that since I have about 50 windows up, I might as well group them -- but now that they're all sorted alphabetically per application, I can't find e.g. which Firefox window I need. progress, please? :-)
*** Bug 593730 has been marked as a duplicate of this bug. ***
For the love of god, can we PLEASE get this reverted back to the FOUR-YEAR-OLD behavior of NOT alphabetically sorting? I'm sorry to shout, but consider the history here: (a) Change made 4 years ago. (b) People affected 3-4 years ago as it came downstream. I and others complained at that time, in this and other bugs. (c) Agreement reached 2 years ago that this was a bad idea and should be reverted. Since then, NOTHING. Its priority is currently "High" but the reversion has not happened. I've been waiting patiently---probably too patiently---for someone to finally have the time to deal with this---should I have been sending a ping every 2 months instead? I am -weeping- with frustration over this issue. This issue, almost singlehandedly, has kept me running a four-year-old release (Hoary, 5.04) on my primary desktop, because having all of my windows sorted alphabetically is just intolerable. (I'm surviving by using forwarded X connections from newer releases to the old desktop.) Now, I -must- leave this ancient, ancient release, and am quite disappointed to find that even in the Ubuntu coming out in two days, the Gnome shipping with it still has this ill-advised change---which was marked for reversion two years ago! So, two requests: (a) Please, PLEASE revert the alphabetical sorting! (b) Since nothing you do can possibly trickle downstream to what I'm running for 6-12 months at this rate, some guidance on how to recompile wnck-applet and/or all of Gnome so I can kill this modification dead would be very, very appreciated. I -hate- the idea of having to run my own build of any part of the window system (since I'll have to pin that and won't be able to accept automatic updates---grrr), but it's better than the current behavior. Please? P.S. The actual patch that started all this is an attachment to this ticket, so if I can figure out what build-deps I need to make the minimally-intrusive recompilation to undo it on my machine, that'd be grand. Lots more discussion about this problem is in bug 366752, which was marked as a duplicate of this bug. Thank you!
Okay, I finally broke down and just made this patch for myself; it turned out to be -way- easier than I thought. (But this should still be reverted here! :) For the benefit of the others following this bug, here's what I did. This was in the Ubuntu Karmic beta on AMD64; you'll have to change the amd64 to i383 if that's your architecture, and make slight changes to version numbers, etc. apt-get install build-essential bzr apt-get build-dep libwnck sudo apt-get build-dep libwnck bzr get https://code.launchpad.net/~ubuntu-desktop/libwnck/ubuntu apt-get source libwnck Then edit libwnck/tasklist.c (currently around lines 1552-3) to comment-out the class_group_task->windows = g_list_sort () stuff (you're reversing the effect of the patch in the attachment to this ticket, but not bothering to undefine the function; that'll give you a harmless compilation warning if you're paying attention). Then: debchange -v 1:2.28.0-0ubuntu1+nosorting debuild -rfakeroot binary cd .. sudo dpkg -i libwnck-common_2.28.0-0ubuntu1+nosorting_all.deb libwnck22_2.28.0-0ubuntu1+nosorting_amd64.deb killall gnome-panel To test: for x in $(seq 1 15); do xterm -n $x & done and note how your window names are now in probably random numerical order (they'd be in numerical order if there was a sleep in there :), and not instead sorted 1 11 12 13 14 15 2 3 4 5 etc. (You'll have to turn on grouping of course by right-clicking in the little widget at the left of the taskbar, since that's what this is fixing). I haven't actually checked to see if the bzr call above contributed any source-code mods that weren't picked up in what I was doing. (The debchange will keep apt-get etc from bugging you about your private package.) Bliss!
(Oops---watch out for the linewrap in the dpkg command above.)
Created attachment 182351 [details] [review] tasklist: make sure windows in groups are sorted consistently Right now, they are sorted by age in some parts of the code and sorted alphabetically in other parts. The desired default (alphabetical ordering) always seems to "win", so we may want to drop the code that sorts it the other way entirely, but for now at least make both places consistent.
Created attachment 182352 [details] [review] tasklist: add new sort policy for windows in groups Right now the tasklist always sorts grouped windows alphabetically. This commit adds a new policy "by age" which sorts things in the same order they show up ungrouped.
Created attachment 182353 [details] [review] wncklet: Add new sorting option for window list groups Right now window list groups sort their windows alphabetically. This commit adds a new option to the panel preferences to change the sorting behavior to the same behavior as ungrouped windows.
I talked to Vincent about this bug a few months ago and he said he was okay with adding a preference here (and I just now got an opportunity to work on it). We have a RHEL customer who's very interested in seeing this get changed. Of course, it may not be as relevant anymore in GNOME 3.
(I just wanted to add that these patches are derived from some work initiated by Sean Lee <slee@redhat.com>)
-- 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/44.