changeset 71545:26164031aa5a

(w32_createwindow): Use CW_USEDEFAULT instead of f->left_pos and SH_SHOW instead of f->top_pos in the call to CreateWindow. Record the actual position in f->left_pos and f->top_pos.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 30 Jun 2006 13:40:21 +0000
parents 70062eaec923
children d1eb48dbd3e6
files src/w32fns.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32fns.c	Fri Jun 30 13:27:10 2006 +0000
+++ b/src/w32fns.c	Fri Jun 30 13:40:21 2006 +0000
@@ -2085,8 +2085,8 @@
     = CreateWindow (EMACS_CLASS,
 		    f->namebuf,
 		    f->output_data.w32->dwStyle | WS_CLIPCHILDREN,
-		    f->left_pos,
-		    f->top_pos,
+		    CW_USEDEFAULT,
+		    SW_SHOW,
 		    rect.right - rect.left,
 		    rect.bottom - rect.top,
 		    NULL,
@@ -2107,6 +2107,11 @@
 
       /* Do this to discard the default setting specified by our parent. */
       ShowWindow (hwnd, SW_HIDE);
+
+      /* Update frame positions. */
+      GetWindowRect (hwnd, &rect);
+      f->left_pos = rect.left;
+      f->top_pos = rect.top;
     }
 }