Mercurial > emacs
comparison src/xterm.c @ 12074:111aadc2521a
(x_text_icon): Do call XSetIconName or XSetWMIconName.
Don't save ICON_NAME anywhere.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 05 Jun 1995 12:38:46 +0000 |
parents | d50bd9a36c63 |
children | f6e8c75cca52 |
comparison
equal
deleted
inserted
replaced
12073:1b0018c43060 | 12074:111aadc2521a |
---|---|
4313 | 4313 |
4314 return 0; | 4314 return 0; |
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 |
4320 int | 4321 int |
4321 x_text_icon (f, icon_name) | 4322 x_text_icon (f, icon_name) |
4322 struct frame *f; | 4323 struct frame *f; |
4323 char *icon_name; | 4324 char *icon_name; |
4324 { | 4325 { |
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); |
4341 f->display.x->icon_bitmap = 0; | 4349 f->display.x->icon_bitmap = 0; |
4342 x_wm_set_icon_pixmap (f, 0); | 4350 x_wm_set_icon_pixmap (f, 0); |