From 2baa63a100d76110915133c7fcb728c8545b11ca Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 13 Oct 2003 19:00:19 +0000 Subject: [PATCH] Make it work as documented when pixmap or mask is NULL. (#124081) Mon Oct 13 20:58:07 2003 Matthias Clasen * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon): Make it work as documented when pixmap or mask is NULL. (#124081) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gdk/x11/gdkwindow-x11.c | 8 ++++++-- 6 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1086a4f629..dd5c551702 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 13 20:58:07 2003 Matthias Clasen + + * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon): Make it work + as documented when pixmap or mask is NULL. (#124081) + Mon Oct 13 20:21:38 2003 Kristian Rietveld * gtk/gtkentry.c (gtk_entry_set_text): I overlooked a return when diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1086a4f629..dd5c551702 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Mon Oct 13 20:58:07 2003 Matthias Clasen + + * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon): Make it work + as documented when pixmap or mask is NULL. (#124081) + Mon Oct 13 20:21:38 2003 Kristian Rietveld * gtk/gtkentry.c (gtk_entry_set_text): I overlooked a return when diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 1086a4f629..dd5c551702 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Mon Oct 13 20:58:07 2003 Matthias Clasen + + * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon): Make it work + as documented when pixmap or mask is NULL. (#124081) + Mon Oct 13 20:21:38 2003 Kristian Rietveld * gtk/gtkentry.c (gtk_entry_set_text): I overlooked a return when diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 1086a4f629..dd5c551702 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Mon Oct 13 20:58:07 2003 Matthias Clasen + + * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon): Make it work + as documented when pixmap or mask is NULL. (#124081) + Mon Oct 13 20:21:38 2003 Kristian Rietveld * gtk/gtkentry.c (gtk_entry_set_text): I overlooked a return when diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1086a4f629..dd5c551702 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Mon Oct 13 20:58:07 2003 Matthias Clasen + + * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon): Make it work + as documented when pixmap or mask is NULL. (#124081) + Mon Oct 13 20:21:38 2003 Kristian Rietveld * gtk/gtkentry.c (gtk_entry_set_text): I overlooked a return when diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index ce7804b3af..6366c85310 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -3373,16 +3373,20 @@ gdk_window_set_icon (GdkWindow *window, if (toplevel->icon_pixmap != pixmap) { + if (pixmap) + g_object_ref (pixmap); if (toplevel->icon_pixmap) g_object_unref (toplevel->icon_pixmap); - toplevel->icon_pixmap = g_object_ref (pixmap); + toplevel->icon_pixmap = pixmap; } if (toplevel->icon_mask != mask) { + if (mask) + g_object_ref (mask); if (toplevel->icon_mask) g_object_unref (toplevel->icon_mask); - toplevel->icon_mask = g_object_ref (mask); + toplevel->icon_mask = mask; } update_wm_hints (window, FALSE);