mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
Don't call XFreeColormap on foreign colormaps
svn path=/trunk/; revision=19969
This commit is contained in:
parent
5fb4e96b5d
commit
1d119938c7
@ -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>
|
||||
|
||||
* tests/autotestfilechooser.c: Cover
|
||||
|
@ -46,7 +46,7 @@ struct _GdkColormapPrivateX11
|
||||
GdkColorInfo *info;
|
||||
time_t last_sync_time;
|
||||
|
||||
guint foreign : 1;
|
||||
gboolean foreign;
|
||||
};
|
||||
|
||||
#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);
|
||||
|
||||
if (!private->screen->closed)
|
||||
if (!private->screen->closed && !private->foreign)
|
||||
XFreeColormap (GDK_SCREEN_XDISPLAY (private->screen), private->xcolormap);
|
||||
|
||||
if (private->hash)
|
||||
@ -1292,6 +1292,7 @@ gdk_x11_colormap_foreign_new (GdkVisual *visual,
|
||||
private->screen = screen;
|
||||
private->xcolormap = xcolormap;
|
||||
private->private_val = FALSE;
|
||||
private->foreign = TRUE;
|
||||
|
||||
colormap->size = visual->colormap_size;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user