forked from AuroraMiddleware/gtk
Add a is_foreign flag to the structure. Do not call XFreePixmap on pixmaps
Sun Jul 2 13:06:26 2000 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkpixmap-x11.[ch] Changes-1.4.txt: Add a is_foreign flag to the structure. Do not call XFreePixmap on pixmaps created by gdk_pixmap_foreign_new().
This commit is contained in:
parent
4f1ccca594
commit
fe7fb8c62f
@ -1,3 +1,9 @@
|
||||
Sun Jul 2 13:06:26 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkpixmap-x11.[ch] Changes-1.4.txt: Add a is_foreign
|
||||
flag to the structure. Do not call XFreePixmap on pixmaps created
|
||||
by gdk_pixmap_foreign_new().
|
||||
|
||||
Sun Jul 2 12:45:50 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jul 2 13:06:26 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkpixmap-x11.[ch] Changes-1.4.txt: Add a is_foreign
|
||||
flag to the structure. Do not call XFreePixmap on pixmaps created
|
||||
by gdk_pixmap_foreign_new().
|
||||
|
||||
Sun Jul 2 12:45:50 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jul 2 13:06:26 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkpixmap-x11.[ch] Changes-1.4.txt: Add a is_foreign
|
||||
flag to the structure. Do not call XFreePixmap on pixmaps created
|
||||
by gdk_pixmap_foreign_new().
|
||||
|
||||
Sun Jul 2 12:45:50 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jul 2 13:06:26 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkpixmap-x11.[ch] Changes-1.4.txt: Add a is_foreign
|
||||
flag to the structure. Do not call XFreePixmap on pixmaps created
|
||||
by gdk_pixmap_foreign_new().
|
||||
|
||||
Sun Jul 2 12:45:50 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jul 2 13:06:26 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkpixmap-x11.[ch] Changes-1.4.txt: Add a is_foreign
|
||||
flag to the structure. Do not call XFreePixmap on pixmaps created
|
||||
by gdk_pixmap_foreign_new().
|
||||
|
||||
Sun Jul 2 12:45:50 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jul 2 13:06:26 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkpixmap-x11.[ch] Changes-1.4.txt: Add a is_foreign
|
||||
flag to the structure. Do not call XFreePixmap on pixmaps created
|
||||
by gdk_pixmap_foreign_new().
|
||||
|
||||
Sun Jul 2 12:45:50 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jul 2 13:06:26 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkpixmap-x11.[ch] Changes-1.4.txt: Add a is_foreign
|
||||
flag to the structure. Do not call XFreePixmap on pixmaps created
|
||||
by gdk_pixmap_foreign_new().
|
||||
|
||||
Sun Jul 2 12:45:50 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
|
||||
|
@ -184,5 +184,9 @@ Incompatible Changes from GTK+-1.2 to GTK+-1.4:
|
||||
|
||||
#define gdk_rgb_get_cmap gdk_rgb_get_colormap
|
||||
|
||||
|
||||
|
||||
- gdk_pixmap_foreign_new() no longer calls XFreePixmap() on the
|
||||
pixmap when the GdkPixmap is finalized. This change corresponds
|
||||
to the behavior of gdk_window_foreign_new(), and fixes a lot
|
||||
of problems with code where the pixmap wasn't supposed to be
|
||||
freed. If XFreePixmap() is needed, it can be done using the
|
||||
destroy-notification facilities of g_object_set_data().
|
@ -120,8 +120,10 @@ gdk_pixmap_impl_x11_finalize (GObject *object)
|
||||
{
|
||||
GdkPixmapImplX11 *impl = GDK_PIXMAP_IMPL_X11 (object);
|
||||
GdkPixmap *wrapper = GDK_PIXMAP (GDK_DRAWABLE_IMPL_X11 (impl)->wrapper);
|
||||
|
||||
if (!impl->is_foreign)
|
||||
XFreePixmap (GDK_PIXMAP_XDISPLAY (wrapper), GDK_PIXMAP_XID (wrapper));
|
||||
|
||||
XFreePixmap (GDK_PIXMAP_XDISPLAY (wrapper), GDK_PIXMAP_XID (wrapper));
|
||||
gdk_xid_table_remove (GDK_PIXMAP_XID (wrapper));
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
@ -171,10 +173,11 @@ gdk_pixmap_new (GdkWindow *window,
|
||||
GDK_WINDOW_XID (window),
|
||||
width, height, depth);
|
||||
|
||||
pix_impl->is_foreign = FALSE;
|
||||
pix_impl->width = width;
|
||||
pix_impl->height = height;
|
||||
GDK_PIXMAP_OBJECT (pixmap)->depth = depth;
|
||||
|
||||
|
||||
gdk_xid_table_insert (&GDK_PIXMAP_XID (pixmap), pixmap);
|
||||
|
||||
return pixmap;
|
||||
@ -205,6 +208,7 @@ gdk_bitmap_create_from_data (GdkWindow *window,
|
||||
pix_impl = GDK_PIXMAP_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
|
||||
draw_impl->wrapper = GDK_DRAWABLE (pixmap);
|
||||
|
||||
pix_impl->is_foreign = FALSE;
|
||||
pix_impl->width = width;
|
||||
pix_impl->height = height;
|
||||
GDK_PIXMAP_OBJECT (pixmap)->depth = 1;
|
||||
@ -253,6 +257,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
|
||||
pix_impl = GDK_PIXMAP_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
|
||||
draw_impl->wrapper = GDK_DRAWABLE (pixmap);
|
||||
|
||||
pix_impl->is_foreign = FALSE;
|
||||
pix_impl->width = width;
|
||||
pix_impl->height = height;
|
||||
GDK_PIXMAP_OBJECT (pixmap)->depth = depth;
|
||||
@ -301,6 +306,7 @@ gdk_pixmap_foreign_new (GdkNativeWindow anid)
|
||||
draw_impl->xdisplay = GDK_DISPLAY ();
|
||||
draw_impl->xid = xpixmap;
|
||||
|
||||
pix_impl->is_foreign = TRUE;
|
||||
pix_impl->width = w_ret;
|
||||
pix_impl->height = h_ret;
|
||||
GDK_PIXMAP_OBJECT (pixmap)->depth = depth_ret;
|
||||
|
@ -53,6 +53,8 @@ struct _GdkPixmapImplX11
|
||||
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
guint is_foreign : 1;
|
||||
};
|
||||
|
||||
struct _GdkPixmapImplX11Class
|
||||
|
Loading…
Reference in New Issue
Block a user