bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37415: Asserting failure setting frame parameters to non-fixnum valu


From: martin rudalics
Subject: bug#37415: Asserting failure setting frame parameters to non-fixnum values in early-init.el
Date: Fri, 20 Sep 2019 10:13:03 +0200

>> But even if we cannot fix the behavior we have to avoid the crash.
>
> That was my purpose when I proposed to signal an error in this case.

Should we even signal an error then?  The parameter would be applied
later anyway as soon as we can parse the display geometry.  At least
here the frame appears as expected if my early-init.el just contains

(setq default-frame-alist '((left . (- 100))))

and the patch below is used.

martin

diff --git a/src/w32fns.c b/src/w32fns.c
index 34abd026f9..3771d9d5f9 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5427,14 +5427,16 @@ my_create_window (struct frame * f)
                               RES_TYPE_NUMBER);
   top = gui_display_get_arg (dpyinfo, Qnil, Qtop, "top", "Top",
                              RES_TYPE_NUMBER);
-  if (EQ (left, Qunbound))
-    coords[0] = CW_USEDEFAULT;
-  else
+
+  if (FIXNUMP (left))
     coords[0] = XFIXNUM (left);
-  if (EQ (top, Qunbound))
-    coords[1] = CW_USEDEFAULT;
   else
+    coords[0] = CW_USEDEFAULT;
+
+  if (FIXNUMP (top))
     coords[1] = XFIXNUM (top);
+  else
+    coords[1] = CW_USEDEFAULT;

   if (!PostThreadMessage (dwWindowsThreadId, WM_EMACS_CREATEWINDOW,
                          (WPARAM)f, (LPARAM)coords))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]