# HG changeset patch # User vins # Date 1187872294 0 # Node ID e93da3cda3cb1e576dc91a85c571f1bc0488d96d # Parent 4dd678fb2fb6ba26400be3e9f7b133bb06fb8ac7 [xemacs-hg @ 2007-08-23 12:31:32 by vins] Patch frame-msw.c to support cygwin's run command. diff -r 4dd678fb2fb6 -r e93da3cda3cb src/ChangeLog --- a/src/ChangeLog Wed Aug 22 21:51:12 2007 +0000 +++ b/src/ChangeLog Thu Aug 23 12:31:34 2007 +0000 @@ -1,3 +1,10 @@ +2007-08-18 Vin Shelton + + * frame-msw.c (mswindows_init_frame_3): Restore extra call to + ShowWindow so that cygwin's run command can be used to open an + XEmacs session. Without this, no frame appears when the XEmacs + process starts up. + 2006-10-26 Nix * dumper.c (pdump_load): Statically allocate a large enough diff -r 4dd678fb2fb6 -r e93da3cda3cb src/frame-msw.c --- a/src/frame-msw.c Wed Aug 22 21:51:12 2007 +0000 +++ b/src/frame-msw.c Thu Aug 23 12:31:34 2007 +0000 @@ -304,10 +304,20 @@ static void mswindows_init_frame_3 (struct frame *f) { - /* Don't do this earlier or we get a WM_PAINT before the frame is ready */ - ShowWindow (FRAME_MSWINDOWS_HANDLE (f), SW_SHOWNORMAL); - SetForegroundWindow (FRAME_MSWINDOWS_HANDLE (f)); - DragAcceptFiles (FRAME_MSWINDOWS_HANDLE (f), TRUE); + /* Don't do this earlier or we get a WM_PAINT before the frame is ready. */ + ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL); +#ifdef CYGWIN + /* The SW_x parameter in the first call that an app makes to ShowWindow is + * ignored, and the parameter specified in the caller's STARTUPINFO is + * substituted instead. That parameter is SW_HIDE if we were started by + * runemacs, so call this twice. #### runemacs is evil. To see why this + * second call was restored, see the threads referenced by + * 20a807210611011157j57ea2b22ue892f4dfcb6aade8@mail.gmail.com and + * 20a807210708181345m7ac94ff2m43337be71e853d95@mail.gmail.com . */ + ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL); +#endif + SetForegroundWindow (FRAME_MSWINDOWS_HANDLE(f)); + DragAcceptFiles (FRAME_MSWINDOWS_HANDLE(f), TRUE); } static void