From 492aeef41c88b493269ceb6f85168d112485f9c0 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Sat, 20 Apr 2002 14:45:28 +0000 Subject: [PATCH] replace GDK_IS_WINDOW with GDK_IS_DRAWABLE in the assert, only check Sat Apr 20 16:49:26 2002 Kristian Rietveld * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new): replace GDK_IS_WINDOW with GDK_IS_DRAWABLE in the assert, only check GDK_WINDOW_DESTROYED if window is a GdkWindow, (gdk_bitmap_create_from_data): ditto, (gdk_pixmap_create_from_data): ditto --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gdk/x11/gdkpixmap-x11.c | 12 ++++++------ 7 files changed, 54 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index d063ca0e2c..8e462ef7f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sat Apr 20 16:49:26 2002 Kristian Rietveld + + * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new): replace GDK_IS_WINDOW + with GDK_IS_DRAWABLE in the assert, only check GDK_WINDOW_DESTROYED + if window is a GdkWindow, + (gdk_bitmap_create_from_data): ditto, + (gdk_pixmap_create_from_data): ditto + Fri Apr 19 23:38:16 2002 Kristian Rietveld Fixes #50310. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d063ca0e2c..8e462ef7f4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Sat Apr 20 16:49:26 2002 Kristian Rietveld + + * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new): replace GDK_IS_WINDOW + with GDK_IS_DRAWABLE in the assert, only check GDK_WINDOW_DESTROYED + if window is a GdkWindow, + (gdk_bitmap_create_from_data): ditto, + (gdk_pixmap_create_from_data): ditto + Fri Apr 19 23:38:16 2002 Kristian Rietveld Fixes #50310. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d063ca0e2c..8e462ef7f4 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Sat Apr 20 16:49:26 2002 Kristian Rietveld + + * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new): replace GDK_IS_WINDOW + with GDK_IS_DRAWABLE in the assert, only check GDK_WINDOW_DESTROYED + if window is a GdkWindow, + (gdk_bitmap_create_from_data): ditto, + (gdk_pixmap_create_from_data): ditto + Fri Apr 19 23:38:16 2002 Kristian Rietveld Fixes #50310. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d063ca0e2c..8e462ef7f4 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Sat Apr 20 16:49:26 2002 Kristian Rietveld + + * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new): replace GDK_IS_WINDOW + with GDK_IS_DRAWABLE in the assert, only check GDK_WINDOW_DESTROYED + if window is a GdkWindow, + (gdk_bitmap_create_from_data): ditto, + (gdk_pixmap_create_from_data): ditto + Fri Apr 19 23:38:16 2002 Kristian Rietveld Fixes #50310. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d063ca0e2c..8e462ef7f4 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Sat Apr 20 16:49:26 2002 Kristian Rietveld + + * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new): replace GDK_IS_WINDOW + with GDK_IS_DRAWABLE in the assert, only check GDK_WINDOW_DESTROYED + if window is a GdkWindow, + (gdk_bitmap_create_from_data): ditto, + (gdk_pixmap_create_from_data): ditto + Fri Apr 19 23:38:16 2002 Kristian Rietveld Fixes #50310. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d063ca0e2c..8e462ef7f4 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Sat Apr 20 16:49:26 2002 Kristian Rietveld + + * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new): replace GDK_IS_WINDOW + with GDK_IS_DRAWABLE in the assert, only check GDK_WINDOW_DESTROYED + if window is a GdkWindow, + (gdk_bitmap_create_from_data): ditto, + (gdk_pixmap_create_from_data): ditto + Fri Apr 19 23:38:16 2002 Kristian Rietveld Fixes #50310. diff --git a/gdk/x11/gdkpixmap-x11.c b/gdk/x11/gdkpixmap-x11.c index 78674816ea..1f335f2204 100644 --- a/gdk/x11/gdkpixmap-x11.c +++ b/gdk/x11/gdkpixmap-x11.c @@ -162,14 +162,14 @@ gdk_pixmap_new (GdkWindow *window, GdkColormap *cmap; gint window_depth; - g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL); + g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL); g_return_val_if_fail ((window != NULL) || (depth != -1), NULL); g_return_val_if_fail ((width != 0) && (height != 0), NULL); if (!window) window = _gdk_parent_root; - if (GDK_WINDOW_DESTROYED (window)) + if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window)) return NULL; window_depth = gdk_drawable_get_depth (GDK_DRAWABLE (window)); @@ -215,12 +215,12 @@ gdk_bitmap_create_from_data (GdkWindow *window, g_return_val_if_fail (data != NULL, NULL); g_return_val_if_fail ((width != 0) && (height != 0), NULL); - g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL); + g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL); if (!window) window = _gdk_parent_root; - if (GDK_WINDOW_DESTROYED (window)) + if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window)) return NULL; pixmap = g_object_new (gdk_pixmap_get_type (), NULL); @@ -256,7 +256,7 @@ gdk_pixmap_create_from_data (GdkWindow *window, GdkDrawableImplX11 *draw_impl; GdkPixmapImplX11 *pix_impl; - g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL); + g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL); g_return_val_if_fail (data != NULL, NULL); g_return_val_if_fail (fg != NULL, NULL); g_return_val_if_fail (bg != NULL, NULL); @@ -266,7 +266,7 @@ gdk_pixmap_create_from_data (GdkWindow *window, if (!window) window = _gdk_parent_root; - if (GDK_WINDOW_DESTROYED (window)) + if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window)) return NULL; if (depth == -1)