summaryrefslogtreecommitdiff
path: root/hw/xwin
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-02 18:06:14 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-02 18:06:14 +0000
commit3dda2fe0e2e7e4d2c058d32fa8691d12386b978d (patch)
tree1462a9c89a69e87a40f1aaad03c8994eb5c46705 /hw/xwin
parente8d3da3c753677cc1ae86bc5a79f2b7eba181d74 (diff)
Force ShowWindow if XWin was started via run.exe. Fixes mainwindow not
showing bug
Diffstat (limited to 'hw/xwin')
-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 93174a680..1c6995da7 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-31 Alexander Gottwald <ago at freedesktop dot org>
* winmultiwindowwindow.c
diff --git a/hw/xwin/wincreatewnd.c b/hw/xwin/wincreatewnd.c
index 909519916..613111d1c 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))
{