From c24e5e289001c8c671924cc876e6223fdc874475 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 12 Aug 2005 13:13:54 +0000 Subject: [PATCH] gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap) 2005-08-12 Owen Taylor * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap) * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap) * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap): Warn if gdk_drawable_get_colormap (pixmap) is NULL and return. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gdk/linux-fb/gdkwindow-fb.c | 6 ++++++ gdk/win32/gdkwindow-win32.c | 6 ++++++ gdk/x11/gdkwindow-x11.c | 6 ++++++ 6 files changed, 39 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5271b6ade8..9ae69a9842 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-08-12 Owen Taylor + + * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap) + * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap) + * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap): Warn if + gdk_drawable_get_colormap (pixmap) is NULL and return. + 2005-08-12 Matthias Clasen * configure.in: Bump version to 2.8.0 diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5271b6ade8..9ae69a9842 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2005-08-12 Owen Taylor + + * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap) + * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap) + * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap): Warn if + gdk_drawable_get_colormap (pixmap) is NULL and return. + 2005-08-12 Matthias Clasen * configure.in: Bump version to 2.8.0 diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5271b6ade8..9ae69a9842 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2005-08-12 Owen Taylor + + * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap) + * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap) + * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap): Warn if + gdk_drawable_get_colormap (pixmap) is NULL and return. + 2005-08-12 Matthias Clasen * configure.in: Bump version to 2.8.0 diff --git a/gdk/linux-fb/gdkwindow-fb.c b/gdk/linux-fb/gdkwindow-fb.c index 8e278c2a8d..98183131b8 100644 --- a/gdk/linux-fb/gdkwindow-fb.c +++ b/gdk/linux-fb/gdkwindow-fb.c @@ -1473,6 +1473,12 @@ gdk_window_set_back_pixmap (GdkWindow *window, g_return_if_fail (pixmap == NULL || !parent_relative); g_return_if_fail (pixmap == NULL || gdk_drawable_get_depth (window) == gdk_drawable_get_depth (pixmap)); + if (!gdk_drawable_get_colormap (pixmap)) + { + g_warning ("gdk_window_set_back_pixmap(): pixmap must have a colormap"); + return; + } + old_pixmap = private->bg_pixmap; if (parent_relative) diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 6304096bb4..83513cf0f0 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -1849,6 +1849,12 @@ gdk_window_set_back_pixmap (GdkWindow *window, g_return_if_fail (pixmap == NULL || !parent_relative); g_return_if_fail (pixmap == NULL || gdk_drawable_get_depth (window) == gdk_drawable_get_depth (pixmap)); + if (!gdk_drawable_get_colormap (pixmap)) + { + g_warning ("gdk_window_set_back_pixmap(): pixmap must have a colormap"); + return; + } + if (private->bg_pixmap && private->bg_pixmap != GDK_PARENT_RELATIVE_BG && private->bg_pixmap != GDK_NO_BG) diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index b2ced14ac6..b02c86d114 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -2912,6 +2912,12 @@ gdk_window_set_back_pixmap (GdkWindow *window, g_return_if_fail (GDK_IS_WINDOW (window)); g_return_if_fail (pixmap == NULL || !parent_relative); g_return_if_fail (pixmap == NULL || gdk_drawable_get_depth (window) == gdk_drawable_get_depth (pixmap)); + + if (!gdk_drawable_get_colormap (pixmap)) + { + g_warning ("gdk_window_set_back_pixmap(): pixmap must have a colormap"); + return; + } if (private->bg_pixmap && private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&