* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+
+/*
+ * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
+ * file for a list of people on the GTK+ Team. See the ChangeLog
+ * files for a list of changes. These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
if (depth == -1)
depth = gdk_window_get_visual (window)->depth;
- private = g_new (GdkWindowPrivate, 1);
+ private = g_new0 (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
private->xdisplay = window_private->xdisplay;
if (window_private->destroyed)
return NULL;
- private = g_new (GdkWindowPrivate, 1);
+ private = g_new0 (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
private->parent = NULL;
if (depth == -1)
depth = gdk_window_get_visual (window)->depth;
- private = g_new (GdkWindowPrivate, 1);
+ private = g_new0 (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
private->parent = NULL;
color_name = gdk_pixmap_extract_color (buffer);
- if (color_name == NULL ||
+ if (color_name == NULL || g_strcasecmp (color_name, "None") == 0 ||
gdk_color_parse (color_name, &color->color) == FALSE)
{
color->color = *transparent_color;
gdk_pixmap_unref (GdkPixmap *pixmap)
{
GdkWindowPrivate *private = (GdkWindowPrivate *)pixmap;
- g_return_if_fail(pixmap != NULL);
+ g_return_if_fail (pixmap != NULL);
+ g_return_if_fail (private->ref_count > 0);
private->ref_count -= 1;
if (private->ref_count == 0)