aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-06-05 12:38:46 +0000
committerKarl Heuer1995-06-05 12:38:46 +0000
commit1be2d067d30786d60d276f844993b742cde580c9 (patch)
tree71e4827d65465abcc17c87a56c11e7ee2ac57b88
parent80534dd61e7c456a3940daf8630fd0d8767fc5ad (diff)
downloademacs-1be2d067d30786d60d276f844993b742cde580c9.tar.gz
emacs-1be2d067d30786d60d276f844993b742cde580c9.zip
(x_text_icon): Do call XSetIconName or XSetWMIconName.
Don't save ICON_NAME anywhere.
-rw-r--r--src/xterm.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 4824ae1e8f1..eef6efd152c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4315,7 +4315,8 @@ x_bitmap_icon (f, file)
4315} 4315}
4316 4316
4317 4317
4318/* Make the x-window of frame F use a rectangle with text. */ 4318/* Make the x-window of frame F use a rectangle with text.
4319 Use ICON_NAME as the text. */
4319 4320
4320int 4321int
4321x_text_icon (f, icon_name) 4322x_text_icon (f, icon_name)
@@ -4325,16 +4326,23 @@ x_text_icon (f, icon_name)
4325 if (FRAME_X_WINDOW (f) == 0) 4326 if (FRAME_X_WINDOW (f) == 0)
4326 return 1; 4327 return 1;
4327 4328
4328 if (icon_name) 4329#ifdef HAVE_X11R4
4329 f->display.x->icon_label = icon_name; 4330 {
4330 else 4331 XTextProperty text;
4331 if (! f->display.x->icon_label) 4332 text.value = (unsigned char *) icon_name;
4332 f->display.x->icon_label = " *emacs* "; 4333 text.encoding = XA_STRING;
4333 4334 text.format = 8;
4334#if 0 4335 text.nitems = strlen (icon_name);
4335 XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 4336#ifdef USE_X_TOOLKIT
4336 (char *) f->display.x->icon_label); 4337 XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget),
4337#endif 4338 &text);
4339#else /* not USE_X_TOOLKIT */
4340 XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text);
4341#endif /* not USE_X_TOOLKIT */
4342 }
4343#else /* not HAVE_X11R4 */
4344 XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), icon_name);
4345#endif /* not HAVE_X11R4 */
4338 4346
4339 if (f->display.x->icon_bitmap > 0) 4347 if (f->display.x->icon_bitmap > 0)
4340 x_destroy_bitmap (f, f->display.x->icon_bitmap); 4348 x_destroy_bitmap (f, f->display.x->icon_bitmap);