On Sun, Jun 08, 2003 at 01:54:14AM +0000, Mikhael Goikhman wrote:
> On 07 Jun 2003 14:17:41 -0400, Dan Espen wrote:
> > 
> > Olivier Chapuis <[EMAIL PROTECTED]> writes:
> > > On Mon, May 19, 2003 at 01:44:27PM +0200, Dominik Vogt wrote:
> > > > Should the StyleById patch be applied before 2.6?  Please cast
> > > > your votes here.
> > >
> > > Seems that there is no conclusion here. It seems that there is two
> > > votes for it (me and Mikhael) one vote against (Dominik) and one
> > > unclear vote (Dan). So I ask for more votes and clarification
> > > (Dan?). For that I send an other version of the patch (attached).
> > > I've followed all the advice (I can follow) that I get in this
> > > thread.  In particular, I've followed all the remarks (as I can) of
> > > Dominik regarding the code. So, Dominik I even hope you revert your
> > > vote (very little hope ...). Also: the cmds are named WindowStyle and
> > > DestroyWindowStyle and act on the selected window and there is the
> > > doc and some tests in purify.fvwm2rc.
> 
> Can you please clarify one thing. You previously said that after applying
> many WindowStyle commands and switching themes the style list didn't grow.
> Do I understand you correctly? Because it is the Dominik's reason against
> the patch (you seem to cover several other reasons with your new patch).
> 

Yes, with fvwm-themes I've tried to switch and add some window style,
switch and add some window style ..etc and the style list does not
grow (in a not reasonable way). However, one can succeed to found a
way for making the style list to explode (with a limited number of
name) with or without the WindowStyle command. I think you have to do
very strange things for this (with or without the WindowStyle
command).

By the way, I think we may improve a bit __simplify_style_list, by
remplacing:

if (!styles_have_same_id(*cur, *cmp))
{
        blockor((char *)&interflags,
                (char *)&interflags,
                (char *)&cmp->flag_mask,
                sizeof(style_flags));
        blockor((char *)&interflags,
                (char *)&interflags,
                (char *)&cmp->flag_default,
                sizeof(style_flags));
        cmp = SGET_PREV_STYLE(*cmp);
        continue;
}

by something like:

Bool one_fw_can_match_both_ids(window_style s, window_style t)
{
        if (SGET_ID_HAS_WINDOW_ID(s) && SGET_ID_HAS_WINDOW_ID(t) &&
            SGET_WINDOW_ID(s) != SGET_WINDOW_ID(t))
        {
                return False;
        }
        if (SGET_ID_HAS_NAME(s) && SGET_ID_HAS_NAME(t))
        {
                if !(there exists a string which match 
                     SGET_NAME(s) and SGET_NAME(t))
                {
                        return False;
                }
        }
        return True;
}

if (!styles_have_same_id(*cur, *cmp))
{
        if (one_fw_can_match_both_ids(*cur,*cmp))
        {
                blockor((char *)&interflags,
                        (char *)&interflags,
                        (char *)&cmp->flag_mask,
                        sizeof(style_flags));
                blockor((char *)&interflags,
                        (char *)&interflags,
                        (char *)&cmp->flag_default,
                        sizeof(style_flags));
        }
        cmp = SGET_PREV_STYLE(*cmp);
        continue;
}

but I've to think more and we have to found a cleaver algo for: 
 "there exists a string which match SGET_NAME(s) and SGET_NAME(t))"

Regards, Olivier
--
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]

Reply via email to