Don't call XFreeColormap on foreign colormaps
svn path=/trunk/; revision=19969
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2008-04-02 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/gdkcolor-x11.c: Don't call XFreeColormap on foreign
|
||||||
|
colormaps. Found by Daniel Berrange.
|
||||||
|
|
||||||
2008-04-02 Björn Lindqvist <bjourne@gmail.com>
|
2008-04-02 Björn Lindqvist <bjourne@gmail.com>
|
||||||
|
|
||||||
* tests/autotestfilechooser.c: Cover
|
* tests/autotestfilechooser.c: Cover
|
||||||
|
@ -46,7 +46,7 @@ struct _GdkColormapPrivateX11
|
|||||||
GdkColorInfo *info;
|
GdkColorInfo *info;
|
||||||
time_t last_sync_time;
|
time_t last_sync_time;
|
||||||
|
|
||||||
guint foreign : 1;
|
gboolean foreign;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GDK_COLORMAP_PRIVATE_DATA(cmap) ((GdkColormapPrivateX11 *) GDK_COLORMAP (cmap)->windowing_data)
|
#define GDK_COLORMAP_PRIVATE_DATA(cmap) ((GdkColormapPrivateX11 *) GDK_COLORMAP (cmap)->windowing_data)
|
||||||
@ -107,7 +107,7 @@ gdk_colormap_finalize (GObject *object)
|
|||||||
|
|
||||||
gdk_colormap_remove (colormap);
|
gdk_colormap_remove (colormap);
|
||||||
|
|
||||||
if (!private->screen->closed)
|
if (!private->screen->closed && !private->foreign)
|
||||||
XFreeColormap (GDK_SCREEN_XDISPLAY (private->screen), private->xcolormap);
|
XFreeColormap (GDK_SCREEN_XDISPLAY (private->screen), private->xcolormap);
|
||||||
|
|
||||||
if (private->hash)
|
if (private->hash)
|
||||||
@ -1292,6 +1292,7 @@ gdk_x11_colormap_foreign_new (GdkVisual *visual,
|
|||||||
private->screen = screen;
|
private->screen = screen;
|
||||||
private->xcolormap = xcolormap;
|
private->xcolormap = xcolormap;
|
||||||
private->private_val = FALSE;
|
private->private_val = FALSE;
|
||||||
|
private->foreign = TRUE;
|
||||||
|
|
||||||
colormap->size = visual->colormap_size;
|
colormap->size = visual->colormap_size;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user