]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_icon_verify): New function.
authorLuc Teirlinck <teirllm@auburn.edu>
Sat, 24 Jul 2004 12:52:44 +0000 (12:52 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Sat, 24 Jul 2004 12:52:44 +0000 (12:52 +0000)
(Fx_create_frame): Use it.

(From Richard M. Stallman.)

src/ChangeLog
src/xfns.c

index e51cdf554ce53d0fe9dd95f51552fd1f53df7b6b..8d9d72de9d2270e414c05565af07b7bc7e403c33 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-24  Richard M. Stallman  <rms@gnu.org>
+
+       * xfns.c (x_icon_verify): New function.
+       (Fx_create_frame): Use it.
+
 2004-07-22  Barry Fishman <barry_fishman@att.net>  (tiny change)
 
        * s/gnu-linux.h: Use GC_MARK_STACK if __amd64__ is defined.
index 931d31bcedf5a14d33e0039e8350b32a0312276d..dd8b4a4cb126b79198fd290806d2d3c1d63b591f 100644 (file)
@@ -2633,6 +2633,28 @@ x_window (f)
 #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.  */
@@ -3117,6 +3139,8 @@ This function is an internal primitive--use `make-frame' instead.  */)
   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);