* Ralf Angeli (2006-07-20) writes: > * Drew Adams (2006-07-19) writes: > >> This problem occurs even for emacs -Q: the initial frame is about 5cm from >> the left edge and about 6cm from the top edge of the display. Before, it was >> flush with both top and left display edges. > > Frame positioning is now left to Windows unless you specified values > for `top' and `left' in `initial-frame-alist' or > `default-frame-alist'. The latter does not seem to be respected after > the first frame was created. I'll take a look at what the culprit is > unless someone beats me to it.
The following patch fixes this bug:
--- w32fns.c 05 Jul 2006 21:10:18 +0200 1.271 +++ w32fns.c 21 Jul 2006 22:35:40 +0200 @@ -2066,6 +2066,7 @@ { HWND hwnd; RECT rect; + Lisp_Object top, left; rect.left = rect.top = 0; rect.right = FRAME_PIXEL_WIDTH (f); @@ -2081,12 +2082,20 @@ w32_init_class (hinst); } + left = w32_get_arg (Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER); + if (!EQ (left, Qunbound)) + CHECK_NUMBER (left); + + top = w32_get_arg (Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER); + if (!EQ (top, Qunbound)) + CHECK_NUMBER (top); + FRAME_W32_WINDOW (f) = hwnd = CreateWindow (EMACS_CLASS, f->namebuf, f->output_data.w32->dwStyle | WS_CLIPCHILDREN, - CW_USEDEFAULT, - SW_SHOW, + EQ (left, Qunbound) ? CW_USEDEFAULT : XINT (left), + EQ (top, Qunbound) ? CW_USEDEFAULT : XINT (top), rect.right - rect.left, rect.bottom - rect.top, NULL,
One gripe I have with it is that the CHECK_NUMBER macro does not seem to work. If I use a string for the `top' or `left' property no error is thrown. Does anybody know why? I can provide a change log entry once this is settled. Anyway, the patch fixes frame positioning if `top' or `left' was specified in `default-frame-alist'. If the first frame should be created at the correct position right away, the registry keys `Emacs.Top' and `Emacs.Left' have to be used instead. -- Ralf
_______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug