[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] Colormap issues in ecore_x_window_argb_internal_new()

when ecore_x creates an window with an ARGB visual, it creates a
colormap for that visual (ecore_x_window.c:973).

This colormap is evaluated by XCreateWindow() etc.
Afterwards, when the window has been set up, the colormap is freed (line

So now the colormap field in the XSetWindowAttributes structure of the
window points to a freed chunk of memory.

Is this correct behaviour? When a window manager wants to take care of
that window, it has to create the colormap again. There's no way it can
find out whether the colormap pointer is valid, either - so it might
waste resourrces by creating the color map.

I'm probably wrong about a few of these points as my xlib knowledge is
pretty limited :D
But shouldn't we either omit the XFreeColormap() call or also reset the
colormap field? The first alternative seems better to me.

GTK doesn't seem to free their colormaps, btw.



A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Attachment: pgpV66QpEquS7.pgp
Description: PGP signature