aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);