comparison src/frame-msw.c @ 298:70ad99077275 r21-0b47

Import from CVS: tag r21-0b47
author cvs
date Mon, 13 Aug 2007 10:39:40 +0200
parents 4b85ae5eabfb
children 19dcec799385
comparison
equal deleted inserted replaced
297:deca3c1083ac 298:70ad99077275
67 67
68 /* Default properties to use when creating frames. */ 68 /* Default properties to use when creating frames. */
69 Lisp_Object Vdefault_mswindows_frame_plist; 69 Lisp_Object Vdefault_mswindows_frame_plist;
70 Lisp_Object Vmswindows_use_system_frame_size_defaults; 70 Lisp_Object Vmswindows_use_system_frame_size_defaults;
71 71
72 /* Lisp_Object Qname, Qheight, Qwidth, Qinitially_unmapped, Qpopup, Qtop, Qleft; */
73 Lisp_Object Qinitially_unmapped, Qpopup;
74
75 /* This does not need to be GC protected, as it holds a 72 /* This does not need to be GC protected, as it holds a
76 frame Lisp_Object already protected by Fmake_frame */ 73 frame Lisp_Object already protected by Fmake_frame */
77 Lisp_Object Vmswindows_frame_being_created; 74 Lisp_Object Vmswindows_frame_being_created;
78 75
79 static void 76 static void
84 Lisp_Object frame_obj = Qnil; 81 Lisp_Object frame_obj = Qnil;
85 RECT rect; 82 RECT rect;
86 XEMACS_RECT_WH rect_default; 83 XEMACS_RECT_WH rect_default;
87 DWORD style, exstyle; 84 DWORD style, exstyle;
88 HWND hwnd, hwnd_parent; 85 HWND hwnd, hwnd_parent;
89 static BOOL first_frame = 1;
90 86
91 /* Pick up relevant properties */ 87 /* Pick up relevant properties */
92 initially_unmapped = Fplist_get (props, Qinitially_unmapped, Qnil); 88 initially_unmapped = Fplist_get (props, Qinitially_unmapped, Qnil);
93 name = Fplist_get (props, Qname, Qnil); 89 name = Fplist_get (props, Qname, Qnil);
94 90
146 { 142 {
147 style = MSWINDOWS_FRAME_STYLE; 143 style = MSWINDOWS_FRAME_STYLE;
148 exstyle = MSWINDOWS_FRAME_EXSTYLE; 144 exstyle = MSWINDOWS_FRAME_EXSTYLE;
149 hwnd_parent = NULL; 145 hwnd_parent = NULL;
150 146
151 if (first_frame)
152 {
153 style |= WS_VISIBLE;
154 first_frame = 0;
155 }
156
157 rect_default.left = rect_default.top = CW_USEDEFAULT; 147 rect_default.left = rect_default.top = CW_USEDEFAULT;
158 rect_default.width = rect_default.height = CW_USEDEFAULT; 148 rect_default.width = rect_default.height = CW_USEDEFAULT;
159 } 149 }
160 else 150 else
161 { 151 {
222 212
223 /* Called after frame's properties are set */ 213 /* Called after frame's properties are set */
224 static void 214 static void
225 mswindows_init_frame_3 (struct frame *f) 215 mswindows_init_frame_3 (struct frame *f)
226 { 216 {
227 /* Don't do this earlier or we get a WM_PAINT before the frame is ready */ 217 /* Don't do this earlier or we get a WM_PAINT before the frame is ready.
218 * The SW_x parameter in the first call that an app makes to ShowWindow is
219 * ignored, and the parameter specified in the caller's STARTUPINFO is
220 * substituted instead. That parameter is SW_HIDE if we were started by
221 * runemacs, so call this twice. #### runemacs is evil */
222 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL);
228 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL); 223 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL);
229 SetForegroundWindow (FRAME_MSWINDOWS_HANDLE(f)); 224 SetForegroundWindow (FRAME_MSWINDOWS_HANDLE(f));
230 DragAcceptFiles (FRAME_MSWINDOWS_HANDLE(f), TRUE); 225 DragAcceptFiles (FRAME_MSWINDOWS_HANDLE(f), TRUE);
231 } 226 }
232 227