Re: [as-devel] Recomputing icon on title change

Sasha Vasko (
Wed, 12 Dec 2001 13:13:24 -0600

On Monday 19 November 2001 14:36, Frank v Waveren wrote:
> Attached is a patch to make afterstep re-determine which icon to use
> after a window's title has changed. I like this, because my shell is
> set up to set my aterm's title to user@host:<more stuff>, and I have
> different icons, depending on which user/host. Without this patch,
> afterstep will decide which icon to use when the window is first
> iconised, and after that it will always use that icon, which is rather
> annoying if you log into a different account using the same aterm.

Ok, applied to CVS - soone to be released.
I've actually added new option to feel config, to enable this feature :


> I did however hit a problem when checking for memory leaks. Every time
> XGrabKey is called some memory leakage appears to be occuring... I
> strongly suspect it is indeed XGrabKey itself, at least with only the
> XGrabKey commented out no leakage occurs. I suspect a bug in my
> (from XFree86 4.1.0), but before I start getting my hands
> dirty on the libX11 code I'd like to hear from someone that it is
> indeed a bug in the library. The problem can be triggered with the
> attached 'titlechange.c', a quick & dirty program that changes it's
> title very fast, causing the MyXGrabKey and thus XGrabKey to get
> called very often, exposing the leak (titlechange.c only causes
> leakage on an afterstep with my patch applied, I suspect the leak
> would occur on an unpatched afterstep too but you'd need to create and
> destroy a window many times as the unpatched afterstep never calls
> MyXGrabKey more than once per window). To reproduce the leak, run the
> patched afterstep and run titlechange with it's window iconized. I'd
> love to hear from people using libX11 from elsewhere than XFree 4 too
> btw.

I could not see any leak on my machine :(

> PS: I also added two XDestroyWindows as I suspect those windows were
> never getting destroyed and thus were clogging up the X server until
> afterstep disconnects... Once again, someone who knows more about
> X please check...

Right - you did a good thing :)

Thanks alot for your contribution.

The AfterStep Window Manager for X User's Mailing List