summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-02 18:03:08 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-02 18:03:08 +0000
commitdcce87bad275ead19ad14f1e7baf3c1ce973e4e6 (patch)
tree9220c772a1bc809aaf63d1b213b48404ffb9ecc2
parenteaf224e4f977d9ee5ed44a6781d56e363382ff2b (diff)
Force ShowWindow if XWin was started via run.exe. Fixes mainwindow not
showing bug
-rw-r--r--hw/xwin/ChangeLog6
-rw-r--r--hw/xwin/wincreatewnd.c23
2 files changed, 26 insertions, 3 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index d450eda43..804207770 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -1,3 +1,9 @@
+2005-02-02 Alexander Gottwald <ago at freedesktop dot org>
+
+ * wincreatewnd.c:
+ Force ShowWindow if XWin was started via run.exe. Fixes mainwindow
+ not showing bug
+
2005-01-27 Alexander Gottwald <ago at freedesktop dot org>
* winmultiwindowwindow.c
diff --git a/hw/xwin/wincreatewnd.c b/hw/xwin/wincreatewnd.c
index 7b3fe21d0..5b7f39c9c 100644
--- a/hw/xwin/wincreatewnd.c
+++ b/hw/xwin/wincreatewnd.c
@@ -148,6 +148,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
WNDCLASS wc;
RECT rcClient, rcWorkArea;
DWORD dwWindowStyle;
+ BOOL fForceShowWindow = FALSE;
char szTitle[256];
winDebug ("winCreateBoundingWindowWindowed - User w: %d h: %d\n",
@@ -169,9 +170,19 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
#endif
)
{
- dwWindowStyle |= WS_CAPTION;
- if (pScreenInfo->fScrollbars)
- dwWindowStyle |= WS_THICKFRAME | WS_MAXIMIZEBOX;
+ /* Try to handle startup via run.exe. run.exe instructs Windows to
+ * hide all created windows. Detect this case and make sure the
+ * window is shown nevertheless */
+ STARTUPINFO startupInfo;
+ GetStartupInfo(&startupInfo);
+ if (startupInfo.dwFlags & STARTF_USESHOWWINDOW &&
+ startupInfo.wShowWindow == SW_HIDE)
+ {
+ fForceShowWindow = TRUE;
+ }
+ dwWindowStyle |= WS_CAPTION;
+ if (pScreenInfo->fScrollbars)
+ dwWindowStyle |= WS_THICKFRAME | WS_MAXIMIZEBOX;
}
else
dwWindowStyle |= WS_POPUP;
@@ -346,6 +357,12 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
winDebug ("winCreateBoundingWindowWindowed - CreateWindowEx () returned\n");
#endif
+ if (fForceShowWindow)
+ {
+ ErrorF("winCreateBoundingWindowWindowed - Setting normal windowstyle\n");
+ ShowWindow(*phwnd, SW_SHOW);
+ }
+
/* Get the client area coordinates */
if (!GetClientRect (*phwnd, &rcClient))
{