envbvs@epb7.lbl.gov (Brian V. Smith) (04/11/91)
In my .twmrc file, I have named some clients for which I don't want a title bar. The problem is that twm only requires that the first n characters of the client/class in the list match the name of the client/class one wishes to list. For example, in my list for NoTitle, I have the client "xcal", but when I start up "xcalc", it matches the "xcal" in the list and it doesn't get a title bar. It wouldn't matter if I use the class name (XCal), because the first four letters of the class for xcalc also match XCal. Is it possible to simply change the code in LookInList (list.c) to do a "strcmp" instead of a "strncmp", or is there some special reason that it needs to do the "strncmp?" -- Brian V. Smith (bvsmith@lbl.gov) Lawrence Berkeley Laboratory I don't speak for LBL; they don't pay me enough for that.
converse@expo.lcs.mit.EDU (04/12/91)
> In my .twmrc file, I have named some clients for which I don't want a title > bar. The problem is that twm only requires that the first n characters of > the client/class in the list match the name of the client/class one wishes > to list. For example, in my list for NoTitle, I have the client "xcal", > but when I start up "xcalc", it matches the "xcal" in the list and it doesn't > get a title bar. It wouldn't matter if I use the class name (XCal), because > the first four letters of the class for xcalc also match XCal. Right. We've received bug reports on this. The string prefix matching is a bug, not a feature. > Is it possible to simply change the code in LookInList (list.c) to do > a "strcmp" instead of a "strncmp", Yes, that is the fix. Donna Converse converse@expo.lcs.mit.edu
aw@jello.bae.bellcore.com (Andrew Wason) (04/13/91)
In article <9104111831.AA07464@excess.lcs.mit.edu>, converse@expo.lcs.mit.EDU writes: >> bar. The problem is that twm only requires that the first n characters of >> the client/class in the list match the name of the client/class one wishes > >Right. We've received bug reports on this. The string prefix matching >is a bug, not a feature. I thought this was a feature. The twm man page seems to imply that it is (at least it doesn't say it is a bug): [...] When a variable containing a list of strings representing windows is searched (e.g. to determine whether or not to enable autoraise as shown above), a string is considered to match a window if it is a case-sensitive prefix for the window's name name (given by the WM_NAME window property), resource name or class name (both given by the WM_CLASS win- dow property). [...] Lists of Window name prefix strings are indicated by win-list. Andrew _______________________________________________________________________________ Andrew Wason Bell Communications Research aw@bae.bellcore.com Piscataway, NJ bellcore!bae!aw