On 14 Jun 2003 19:04:51 +0200, Olivier Chapuis wrote: > > My "WindowStyle" patch leads me to study the __simplify_style_list > function. > > Here some possible amelioration: > > 1 - style name compatibility: > > Example: > > Style abc* options1 > Style hop* options2 > Style abc* options3 > > with options2 flags-inter options3 not empty. This is not simplified, > but as no window can match both abc* and hop*, in fact this can > be simplified to > > Style hop* options1 > Style abc* merge(options1, option2) > > The point is to write down a efficent algo for: given two pattern p1 > and p2, decides whether there exists a string which matchs both p1 and > p2. I've done this.
The problem here is that it is easy to create a window that matches both "abc*" and "hop*". xterm -class abc -title hop > 2 - string matching sets inclusion > > Style hop options1 > Style hop* option2 > > where options1 is a "flags-subset" of options2. This is not simplified > but as every string which match hop match hop*, this can be > simplified to > > Style hop* option2 > > Again the point is to write down an efficient algo for: given two patterns > p1 and p2, decides whether all string which match p1 match also p2. > I should write this ... I suppose the second pattern may be also "ho*", "h*" or "*". This seems to be safe simplification. > 3 - Upward simplification > > Example: > > Style * SloppyFocus > Style toc ClickToFocus > Style * NoIcon > > is not simplified into: > > Style * SloppyFocus, NoIcon > Style toc ClickToFocus > > This type of case are easy to handle. This seems to be safe simplification too. I.e. it is safe to move any style entry with some flags down or up through all style entries not containing these style flags. Regards, Mikhael. -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
