+2003-02-07 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
+
+ * xterm.c (x_text_icon, x_raise_frame, x_lower_frame)
+ (x_make_frame_invisible, x_wm_set_icon_position): Use
+ FRAME_OUTER_WINDOW instead of ifdef X_TOOLKIT/else/endif.
+
+ * xfns.c (x_set_name, x_set_title): Ditto.
+
2003-02-04 Richard M. Stallman <rms@gnu.org>
* keyboard.c (echo_now): Update before_command_echo_length.
icon.format = 8;
icon.nitems = bytes;
}
-#ifdef USE_X_TOOLKIT
- XSetWMName (FRAME_X_DISPLAY (f),
- XtWindow (f->output_data.x->widget), &text);
- XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget),
- &icon);
-#else /* not USE_X_TOOLKIT */
#ifdef USE_GTK
gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
SDATA (name));
- XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
- &icon);
#else /* not USE_GTK */
- XSetWMName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text);
- XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &icon);
+ XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
#endif /* not USE_GTK */
-#endif /* not USE_X_TOOLKIT */
+
+ XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &icon);
+
if (!NILP (f->icon_name)
&& icon.value != (unsigned char *) SDATA (f->icon_name))
xfree (icon.value);
icon.format = 8;
icon.nitems = bytes;
}
-#ifdef USE_X_TOOLKIT
- XSetWMName (FRAME_X_DISPLAY (f),
- XtWindow (f->output_data.x->widget), &text);
- XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget),
- &icon);
-#else /* not USE_X_TOOLKIT */
+
#ifdef USE_GTK
gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
SDATA (name));
- XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
- &icon);
#else /* not USE_GTK */
- XSetWMName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text);
- XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &icon);
+ XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
#endif /* not USE_GTK */
-#endif /* not USE_X_TOOLKIT */
+
+ XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
+ &icon);
+
if (!NILP (f->icon_name)
&& icon.value != (unsigned char *) SDATA (f->icon_name))
xfree (icon.value);
text.encoding = XA_STRING;
text.format = 8;
text.nitems = strlen (icon_name);
-#ifdef USE_X_TOOLKIT
- XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget),
- &text);
-#else /* not USE_X_TOOLKIT */
- XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text);
-#endif /* not USE_X_TOOLKIT */
+ XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
}
#else /* not HAVE_X11R4 */
- XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), icon_name);
+ XSetIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), icon_name);
#endif /* not HAVE_X11R4 */
if (f->output_data.x->icon_bitmap > 0)
if (f->async_visible)
{
BLOCK_INPUT;
-#ifdef USE_X_TOOLKIT
- XRaiseWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget));
-#else /* not USE_X_TOOLKIT */
- XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
-#endif /* not USE_X_TOOLKIT */
+ XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
XFlush (FRAME_X_DISPLAY (f));
UNBLOCK_INPUT;
}
if (f->async_visible)
{
BLOCK_INPUT;
-#ifdef USE_X_TOOLKIT
- XLowerWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget));
-#else /* not USE_X_TOOLKIT */
- XLowerWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
-#endif /* not USE_X_TOOLKIT */
+ XLowerWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
XFlush (FRAME_X_DISPLAY (f));
UNBLOCK_INPUT;
}
{
Window window;
-#ifdef USE_X_TOOLKIT
/* Use the frame's outermost window, not the one we normally draw on. */
- window = XtWindow (f->output_data.x->widget);
-#else /* not USE_X_TOOLKIT */
- window = FRAME_X_WINDOW (f);
-#endif /* not USE_X_TOOLKIT */
+ window = FRAME_OUTER_WINDOW (f);
/* Don't keep the highlight on an invisible frame. */
if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f)
struct frame *f;
int icon_x, icon_y;
{
-#ifdef USE_X_TOOLKIT
- Window window = XtWindow (f->output_data.x->widget);
-#else
- Window window = FRAME_X_WINDOW (f);
-#endif
+ Window window = FRAME_OUTER_WINDOW (f);
f->output_data.x->wm_hints.flags |= IconPositionHint;
f->output_data.x->wm_hints.icon_x = icon_x;