>>> (1) In iconmgr.c.diff6  at the end is corrected a bug which leads to
>>> *multicolumn* iconmanager window width gradual collapse under certain
>>> circumstances while computing 'wwidth'.  I observed this while resizing
>>> and/or moving the icon manager window and then terminating some client,
>>> say xcalc.  In that moment the icon manager window gets squeezed
>>> unexpectedly showing this bug.
>> I am sure my correction to this problem is not correct, as it only
>> "undoes" something what gets screwed somewhere else (namely, ip->width
>> seems to have incorrect value on enrty into PackIconManager()).  I'll
>> have to study the problem more closely and then suggest a bugfix.
> OK.  I've "#if 0"'ed it out for now.  Let me know when you're ready.
> Marc.

I am making progress.  While finalising XFT-support in cleaning up
memory leaks with the help of your patches I noticed you have missed one
case in leak-cleanup:  the client window title bar.  Here is the
relevant snippet from events.c function HandleDestroyNotify():

    if (Tmp_win->title_height)
        int nb = Scr->TBInfo.nleft + Scr->TBInfo.nright;
        XDeleteContext(dpy, Tmp_win->title_w, TwmContext);
        XDeleteContext(dpy, Tmp_win->title_w, ScreenContext);
        if (Tmp_win->hilite_w)
            XDeleteContext(dpy, Tmp_win->hilite_w, TwmContext);
            XDeleteContext(dpy, Tmp_win->hilite_w, ScreenContext);
        if (Tmp_win->titlebuttons) {
            for (i = 0; i < nb; i++) {
                XDeleteContext (dpy, Tmp_win->titlebuttons[i].window,
                XDeleteContext (dpy, Tmp_win->titlebuttons[i].window,
#ifdef TWM_USE_XFT
        XftDrawDestroy (Tmp_win->xft_title_w);

So all in all we have three cases for every client window to clean up:

(1) client window title
(2) client window icon caption
(3) client window entry in icon-manager window

In addition to these I learned from your code is the case of destroying
some menus, in particular the 'f.menu "TwmWindows"' which is apparently
created and destroyed each time on demand.

Currently I am working on the "multicolumn icon manager width gradual
collapse" problem.  I come to the conclusion this should be an ancient
bug as I encounter various places in code I recognise as attepmts to
work around it.  I suppose the problem is a "design error" in tracking
the whole icon manager window width as such, and not the width of a
single entry (the whole width can be trivially computed each time when
needed).  Tracking the whole width leads to some unpleasant corner cases
which need to be dealt with care in various places.
I am not done yet, it looks better but I have twm crashes in multiscreen
configurations resulting from this bug (as being only half-fixed by now).

Then I propose replacing "mono-10" and "sans-10" with


in twm.c for the case "TWM_USE_XFT" and it works great if no fonts are
given in .twmrc.  (I am not sure if size -100- is better for the general
case, as nowadays fixed resolutions 75x75 are not generally used any
more, but significantly higher, as dynamically autodetected from EDID data?)

In few days I'll put my overworked patch set into public, including
nothing new but finalised opacity enhancements I described some time ago.


    Eeri Kask
Devel mailing list

Reply via email to