# HG changeset patch # User Karl Heuer # Date 802355926 0 # Node ID 111aadc2521afe7e283c98fbbfc105d3067521da # Parent 1b0018c430603fc05f636b87a66f3f96fb4537c9 (x_text_icon): Do call XSetIconName or XSetWMIconName. Don't save ICON_NAME anywhere. diff -r 1b0018c43060 -r 111aadc2521a src/xterm.c --- a/src/xterm.c Mon Jun 05 12:38:20 1995 +0000 +++ b/src/xterm.c Mon Jun 05 12:38:46 1995 +0000 @@ -4315,7 +4315,8 @@ } -/* Make the x-window of frame F use a rectangle with text. */ +/* Make the x-window of frame F use a rectangle with text. + Use ICON_NAME as the text. */ int x_text_icon (f, icon_name) @@ -4325,16 +4326,23 @@ if (FRAME_X_WINDOW (f) == 0) return 1; - if (icon_name) - f->display.x->icon_label = icon_name; - else - if (! f->display.x->icon_label) - f->display.x->icon_label = " *emacs* "; - -#if 0 - XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - (char *) f->display.x->icon_label); -#endif +#ifdef HAVE_X11R4 + { + XTextProperty text; + text.value = (unsigned char *) icon_name; + text.encoding = XA_STRING; + text.format = 8; + text.nitems = strlen (icon_name); +#ifdef USE_X_TOOLKIT + XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget), + &text); +#else /* not USE_X_TOOLKIT */ + XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text); +#endif /* not USE_X_TOOLKIT */ + } +#else /* not HAVE_X11R4 */ + XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), icon_name); +#endif /* not HAVE_X11R4 */ if (f->display.x->icon_bitmap > 0) x_destroy_bitmap (f, f->display.x->icon_bitmap);