diff src/xfns.c @ 89957:c08afac24467

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-26 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-466 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-470 Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 28 Jul 2004 07:05:52 +0000
parents 4c90ffeb71c5 5044b3527ce8
children d8411455de48
line wrap: on
line diff
--- a/src/xfns.c	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/xfns.c	Wed Jul 28 07:05:52 2004 +0000
@@ -2613,6 +2613,28 @@
 #endif /* not USE_GTK */
 #endif /* not USE_X_TOOLKIT */
 
+/* Verify that the icon position args for this window are valid.  */
+
+static void
+x_icon_verify (f, parms)
+     struct frame *f;
+     Lisp_Object parms;
+{
+  Lisp_Object icon_x, icon_y;
+
+  /* Set the position of the icon.  Note that twm groups all
+     icons in an icon window.  */
+  icon_x = x_frame_get_and_record_arg (f, parms, Qicon_left, 0, 0, RES_TYPE_NUMBER);
+  icon_y = x_frame_get_and_record_arg (f, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER);
+  if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound))
+    {
+      CHECK_NUMBER (icon_x);
+      CHECK_NUMBER (icon_y);
+    }
+  else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
+    error ("Both left and top icon corners of icon must be specified");
+}
+
 /* Handle the icon stuff for this window.  Perhaps later we might
    want an x_set_icon_position which can be called interactively as
    well.  */
@@ -3101,6 +3123,8 @@
   tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN);
   f->no_split = minibuffer_only || EQ (tem, Qt);
 
+  x_icon_verify (f, parms);
+
   /* Create the X widget or window.  */
 #ifdef USE_X_TOOLKIT
   x_window (f, window_prompting, minibuffer_only);