On Mon, 1 Feb 2021, Thomas Adam wrote:

From: Thomas Adam <tho...@fvwm.org>
To: Göran Bengtson <goe...@motvillig.se>
Cc: fvwm-workers@fvwm.org
Message-ID: <20210201024234.tsildrt64rahbuzd@debian>
Date: Mon, 1 Feb 2021 02:42:34 +0000
Subject: Re: Changing EdgeThickness moves PanFrameRight.win to a wrong

On Sun, Jan 31, 2021 at 07:45:28PM +0100, Göran Bengtson wrote:
I believe the problem is in virtual.c.  Suggested fix:

*** virtual.c   2021-01-01 12:12:27.981730853 +0100
--- virtual.c.GB        2021-01-29 18:37:16.111064357 +0100
*** 1083,1089 ****
                                        dpy, m->PanFrameRight.win,
                                        (m->si->x + m->si->w) - edge_thickness,
!                                       m->si->y + m->si->h,
                                        edge_thickness, (m->si->y + m->si->h));
                        if (!m->PanFrameRight.isMapped)
--- 1083,1089 ----
                                        dpy, m->PanFrameRight.win,
                                        (m->si->x + m->si->w) - edge_thickness,
!                                       m->si->y,
                                        edge_thickness, (m->si->y + m->si->h));

Thanks.  I've moved this check to a commit on Github, and will probably commit
it in a few days.

I've not seen it in the repository. Conflict with other changes??

In addition, after your latest commit (Fix a 21 byte memory leak), it is not
possible to set the Icon-file/image explicitly for a window anymore (at least
not for me).

I believe that the last added call too free_style in AddWindow in add_windows.c
triggered this. The problem is that some of the setup-functions called from
AddWindow assume that the windows_style argument (pstyle) is left intact.
E.g. when setting fw->icon_bitmap_file in setup_icon.

If they store a copy of the string instead, pstyle can be freed, but that
probably require more changes to free that memmory when windows are
destroyed, icons change, ...

This may be needed in several of the internal setup-functions in add_windows.c,
and may have other sideffects that I can't se.

Maybe desk_get_fw_count in virtual.c should be checked too. free_style is
not called if DO_SKIP_WINDOW_LIST(dfws->fw) or SIS_UNMANAGED(sflags)
is true. Minor memory leak?

                        Göran Bengtson


Reply via email to