summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xterm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 1136b671822..c7f56e1f1f2 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7337,9 +7337,13 @@ x_bitmap_icon (struct frame *f, Lisp_Object file)
#ifdef USE_GTK
- if (xg_set_icon (f, xg_default_icon_file)
- || xg_set_icon_from_xpm_data (f, gnu_xpm_bits))
- return 0;
+ if (FRAME_DISPLAY_INFO (f)->icon_bitmap_id == -2
+ || xg_set_icon (f, xg_default_icon_file)
+ || xg_set_icon_from_xpm_data (f, gnu_xpm_bits))
+ {
+ FRAME_DISPLAY_INFO (f)->icon_bitmap_id = -2;
+ return 0;
+ }
#elif defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)