diff options
author | Eli Zaretskii <[email protected]> | 2006-07-22 11:31:55 +0000 |
---|---|---|
committer | Eli Zaretskii <[email protected]> | 2006-07-22 11:31:55 +0000 |
commit | 48b62d105b88f2fa6544181c63034a87a026f633 (patch) | |
tree | 6c0eee73305fcf0984cfb8bb35ace846051666aa /src | |
parent | 04437a8fe88d416bd6bb3ae5cd8ac42fbd58d962 (diff) |
(w32_createwindow): If `left' and/or `top' frame parameters are bound to some
values, use that instead of CW_USEDEFAULT.
Diffstat (limited to 'src')
-rw-r--r-- | src/w32fns.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 66cac34b2d..68fcced88c 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -2066,6 +2066,7 @@ w32_createwindow (f) { HWND hwnd; RECT rect; + Lisp_Object top, left; rect.left = rect.top = 0; rect.right = FRAME_PIXEL_WIDTH (f); @@ -2081,12 +2082,17 @@ w32_createwindow (f) w32_init_class (hinst); } + /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero + for anything that is not a number and is not Qunbound. */ + left = w32_get_arg (Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER); + top = w32_get_arg (Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER); + 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, |