comparison src/xterm.c @ 49644:834df49192b0

Use FRAME_OUTER_WINDOW instead of ifdef X_TOOLKIT/else/endif
author Jan Djärv <jan.h.d@swipnet.se>
date Fri, 07 Feb 2003 16:38:54 +0000
parents 23a1cea22d13
children 05ebf4266798
comparison
equal deleted inserted replaced
49643:a5205ac20363 49644:834df49192b0
12430 XTextProperty text; 12430 XTextProperty text;
12431 text.value = (unsigned char *) icon_name; 12431 text.value = (unsigned char *) icon_name;
12432 text.encoding = XA_STRING; 12432 text.encoding = XA_STRING;
12433 text.format = 8; 12433 text.format = 8;
12434 text.nitems = strlen (icon_name); 12434 text.nitems = strlen (icon_name);
12435 #ifdef USE_X_TOOLKIT 12435 XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
12436 XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget),
12437 &text);
12438 #else /* not USE_X_TOOLKIT */
12439 XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text);
12440 #endif /* not USE_X_TOOLKIT */
12441 } 12436 }
12442 #else /* not HAVE_X11R4 */ 12437 #else /* not HAVE_X11R4 */
12443 XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), icon_name); 12438 XSetIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), icon_name);
12444 #endif /* not HAVE_X11R4 */ 12439 #endif /* not HAVE_X11R4 */
12445 12440
12446 if (f->output_data.x->icon_bitmap > 0) 12441 if (f->output_data.x->icon_bitmap > 0)
12447 x_destroy_bitmap (f, f->output_data.x->icon_bitmap); 12442 x_destroy_bitmap (f, f->output_data.x->icon_bitmap);
12448 f->output_data.x->icon_bitmap = 0; 12443 f->output_data.x->icon_bitmap = 0;
13622 struct frame *f; 13617 struct frame *f;
13623 { 13618 {
13624 if (f->async_visible) 13619 if (f->async_visible)
13625 { 13620 {
13626 BLOCK_INPUT; 13621 BLOCK_INPUT;
13627 #ifdef USE_X_TOOLKIT 13622 XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
13628 XRaiseWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget));
13629 #else /* not USE_X_TOOLKIT */
13630 XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
13631 #endif /* not USE_X_TOOLKIT */
13632 XFlush (FRAME_X_DISPLAY (f)); 13623 XFlush (FRAME_X_DISPLAY (f));
13633 UNBLOCK_INPUT; 13624 UNBLOCK_INPUT;
13634 } 13625 }
13635 } 13626 }
13636 13627
13641 struct frame *f; 13632 struct frame *f;
13642 { 13633 {
13643 if (f->async_visible) 13634 if (f->async_visible)
13644 { 13635 {
13645 BLOCK_INPUT; 13636 BLOCK_INPUT;
13646 #ifdef USE_X_TOOLKIT 13637 XLowerWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
13647 XLowerWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget));
13648 #else /* not USE_X_TOOLKIT */
13649 XLowerWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
13650 #endif /* not USE_X_TOOLKIT */
13651 XFlush (FRAME_X_DISPLAY (f)); 13638 XFlush (FRAME_X_DISPLAY (f));
13652 UNBLOCK_INPUT; 13639 UNBLOCK_INPUT;
13653 } 13640 }
13654 } 13641 }
13655 13642
13835 x_make_frame_invisible (f) 13822 x_make_frame_invisible (f)
13836 struct frame *f; 13823 struct frame *f;
13837 { 13824 {
13838 Window window; 13825 Window window;
13839 13826
13840 #ifdef USE_X_TOOLKIT
13841 /* Use the frame's outermost window, not the one we normally draw on. */ 13827 /* Use the frame's outermost window, not the one we normally draw on. */
13842 window = XtWindow (f->output_data.x->widget); 13828 window = FRAME_OUTER_WINDOW (f);
13843 #else /* not USE_X_TOOLKIT */
13844 window = FRAME_X_WINDOW (f);
13845 #endif /* not USE_X_TOOLKIT */
13846 13829
13847 /* Don't keep the highlight on an invisible frame. */ 13830 /* Don't keep the highlight on an invisible frame. */
13848 if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f) 13831 if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f)
13849 FRAME_X_DISPLAY_INFO (f)->x_highlight_frame = 0; 13832 FRAME_X_DISPLAY_INFO (f)->x_highlight_frame = 0;
13850 13833
14411 void 14394 void
14412 x_wm_set_icon_position (f, icon_x, icon_y) 14395 x_wm_set_icon_position (f, icon_x, icon_y)
14413 struct frame *f; 14396 struct frame *f;
14414 int icon_x, icon_y; 14397 int icon_x, icon_y;
14415 { 14398 {
14416 #ifdef USE_X_TOOLKIT 14399 Window window = FRAME_OUTER_WINDOW (f);
14417 Window window = XtWindow (f->output_data.x->widget);
14418 #else
14419 Window window = FRAME_X_WINDOW (f);
14420 #endif
14421 14400
14422 f->output_data.x->wm_hints.flags |= IconPositionHint; 14401 f->output_data.x->wm_hints.flags |= IconPositionHint;
14423 f->output_data.x->wm_hints.icon_x = icon_x; 14402 f->output_data.x->wm_hints.icon_x = icon_x;
14424 f->output_data.x->wm_hints.icon_y = icon_y; 14403 f->output_data.x->wm_hints.icon_y = icon_y;
14425 14404