changeset 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 a5205ac20363
children 4e94855c037e
files src/ChangeLog src/xfns.c src/xterm.c
diffstat 3 files changed, 24 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Feb 07 11:56:09 2003 +0000
+++ b/src/ChangeLog	Fri Feb 07 16:38:54 2003 +0000
@@ -1,3 +1,11 @@
+2003-02-07  Jan Dj,Ad(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.
--- a/src/xfns.c	Fri Feb 07 11:56:09 2003 +0000
+++ b/src/xfns.c	Fri Feb 07 16:38:54 2003 +0000
@@ -2552,22 +2552,15 @@
 	    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);
@@ -2666,22 +2659,17 @@
 	    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));
+#else /* not USE_GTK */
+	XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
+#endif /* not USE_GTK */
+
 	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);
-#endif /* not USE_GTK */
-#endif /* not USE_X_TOOLKIT */
+
 	if (!NILP (f->icon_name)
 	    && icon.value != (unsigned char *) SDATA (f->icon_name))
 	  xfree (icon.value);
--- a/src/xterm.c	Fri Feb 07 11:56:09 2003 +0000
+++ b/src/xterm.c	Fri Feb 07 16:38:54 2003 +0000
@@ -12432,15 +12432,10 @@
     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)
@@ -13624,11 +13619,7 @@
   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;
     }
@@ -13643,11 +13634,7 @@
   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;
     }
@@ -13837,12 +13824,8 @@
 {
   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)
@@ -14413,11 +14396,7 @@
      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;