Re: Bug report: FvwmIconMan weighted sorting
On 3 October 2009 02:23, Thomas Adam wrote: > 2009/9/22 Thomas Adam : >> 2009/9/22 Leeman Strout : >>> I realize that it's all case sensitive, and I used xprop to find this info. >>> As for specific cases for case sensitivity, this is what xprop says for >>> gvim: WM_CLASS(STRING) = "gvim", "Gvim" and pidgin: >> >> Ah -- you're failing to interpret that correctly. The lowercase >> version is the *resource*, and the "Gvim" one there is the *class*. >> Look at FvwmIdent for instance. > > Leeman, > > What is the status of this? It was left dangling, pending feedback from you. I'll try one last time, then I am unconditionally dropping this without another word -- I just want my TODO list to shrink. Leeman -- speak now about the status of this, or consider it unconditionally dropped. ;P -- Thomas Adam
Re: Bug report: FvwmIconMan weighted sorting
2009/9/22 Thomas Adam : > 2009/9/22 Leeman Strout : >> I realize that it's all case sensitive, and I used xprop to find this info. >> As for specific cases for case sensitivity, this is what xprop says for >> gvim: WM_CLASS(STRING) = "gvim", "Gvim" and pidgin: > > Ah -- you're failing to interpret that correctly. The lowercase > version is the *resource*, and the "Gvim" one there is the *class*. > Look at FvwmIdent for instance. Leeman, What is the status of this? It was left dangling, pending feedback from you. -- Thomas Adam
Re: Bug report: FvwmIconMan weighted sorting
2009/9/22 Leeman Strout : > I realize that it's all case sensitive, and I used xprop to find this info. > As for specific cases for case sensitivity, this is what xprop says for > gvim: WM_CLASS(STRING) = "gvim", "Gvim" and pidgin: Ah -- you're failing to interpret that correctly. The lowercase version is the *resource*, and the "Gvim" one there is the *class*. Look at FvwmIdent for instance. So in your case, in terms of your config file, you probably want to do: s/class/resource//g But it's academic at this point, since all of this has come down to your own misunderstanding entire. Next time, use FvwmIdent for this sort of thing. xprop is a tool intended for developers more than anything else. WM_CLASS(STRING) = > "pidgin", "Pidgin" So those should be no issue I would think. See above. > Paying attention to your specifying "class" I re-read the IconMan man page. > Is IconMan not able to deal with name="..." as in my jEdit line? It is, I just found it easier to use classes/ > Other than that it would seem that this config should work. But it won't. See above. Again, as I stated originally, as the weightings in your example mostly come out all at 40, FvwmIconMan will fall back to a string comparison for working out placements in the FvwmIconMan list. -- Thomas Adam
Re: Bug report: FvwmIconMan weighted sorting
Thomas Adam wrote: Hello -- 2009/9/9 Leeman Strout : I believe that I am experiencing a bug in the weighted sorting for FvwmIconMan. pertinent Iconman config: *FvwmIconMan: Sort weighted *FvwmIconMan: SortWeight 5 class=Firefox *FvwmIconMan: SortWeight 15 class=gvim *FvwmIconMan: SortWeight 15 name=jEdit* *FvwmIconMan: SortWeight 20 class=Terminal *FvwmIconMan: SortWeight 30 class=pidgin *FvwmIconMan: SortWeight 40 Actual results in IconMan: Firefox / gcalc / gvim / pidgin / gftp / jEdit / Thunar / Terminal Expected results: Firefox / gvim / jEdit / Terminal / pidgin / (gftp / Thunar / gcalc) Sorry it's taken me so long to get back to -- I've been busy. I think I've found the bug you're referring to -- patch attached, so if you could apply it to the latest CVS HEAD, that'd be grand. But first -- I really hope the above config snippet is in error -- I mean, you *do* realise that the window Class, like everything else is case-sensitive, right? For me pidgin's class is really "Pidgin", and gvim's class is really "Gvim". You'll want to correct that first, and I suspect when you do you'll get your expected result -- because at the moment, the windows are being treated as though they had a weighting of 40 in your example. However, there is an edge-case in the comparisons for working out when the slots for the windows are meant to happen, and it's that which this patch tries to address. I really haven't tested it, so I would appreciate you do thoroughly before I even consider adding it to CVS. -- Thomas Adam I realize that it's all case sensitive, and I used xprop to find this info. As for specific cases for case sensitivity, this is what xprop says for gvim: WM_CLASS(STRING) = "gvim", "Gvim"and pidgin: WM_CLASS(STRING) = "pidgin", "Pidgin" So those should be no issue I would think. Paying attention to your specifying "class" I re-read the IconMan man page. Is IconMan not able to deal with name="..." as in my jEdit line? Other than that it would seem that this config should work. Leeman
Re: Bug report: FvwmIconMan weighted sorting
Hello -- 2009/9/9 Leeman Strout : > I believe that I am experiencing a bug in the weighted sorting for > FvwmIconMan. > > pertinent Iconman config: > *FvwmIconMan: Sort weighted > > *FvwmIconMan: SortWeight 5 class=Firefox > *FvwmIconMan: SortWeight 15 class=gvim > *FvwmIconMan: SortWeight 15 name=jEdit* > *FvwmIconMan: SortWeight 20 class=Terminal > *FvwmIconMan: SortWeight 30 class=pidgin > > *FvwmIconMan: SortWeight 40 > > Actual results in IconMan: > Firefox / gcalc / gvim / pidgin / gftp / jEdit / Thunar / Terminal > > Expected results: > Firefox / gvim / jEdit / Terminal / pidgin / (gftp / Thunar / gcalc) Sorry it's taken me so long to get back to -- I've been busy. I think I've found the bug you're referring to -- patch attached, so if you could apply it to the latest CVS HEAD, that'd be grand. But first -- I really hope the above config snippet is in error -- I mean, you *do* realise that the window Class, like everything else is case-sensitive, right? For me pidgin's class is really "Pidgin", and gvim's class is really "Gvim". You'll want to correct that first, and I suspect when you do you'll get your expected result -- because at the moment, the windows are being treated as though they had a weighting of 40 in your example. However, there is an edge-case in the comparisons for working out when the slots for the windows are meant to happen, and it's that which this patch tries to address. I really haven't tested it, so I would appreciate you do thoroughly before I even consider adding it to CVS. -- Thomas Adam Index: modules/FvwmIconMan/xmanager.c === RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/xmanager.c,v retrieving revision 1.95 diff -u -r1.95 xmanager.c --- modules/FvwmIconMan/xmanager.c 28 Jan 2007 15:29:26 - 1.95 +++ modules/FvwmIconMan/xmanager.c 21 Sep 2009 20:07:36 - @@ -2153,7 +2153,15 @@ wb = compute_weight(b); if (wa != wb) { - return wa - wb; + /* TA: (2009-09-21): If the weightings of the window +* don't match, only take the difference for list +* insertion if the difference is less than the +* weighting on the window -- and if not, use the +* original weighting. This takes into account those +* windows using a default weighting matched against +* those windows which have specific weightings. +*/ + return (wa - wb) < wa ? (wa - wb) : wa; } return strcmp((a->display_string)? a->display_string:"", (b->display_string)? b->display_string:"");