changeset 4139:e93da3cda3cb

[xemacs-hg @ 2007-08-23 12:31:32 by vins] Patch frame-msw.c to support cygwin's run command.
author vins
date Thu, 23 Aug 2007 12:31:34 +0000
parents 4dd678fb2fb6
children 89310296a3be
files src/ChangeLog src/frame-msw.c
diffstat 2 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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  <acs@xemacs.org>
+
+	* 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  <nix@esperi.org.uk>
 
 	* dumper.c (pdump_load): Statically allocate a large enough
--- 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