Force ShowWindow if XWin was started via run.exe. Fixes mainwindow not

showing bug
This commit is contained in:
Alexander Gottwald 2005-02-02 18:06:14 +00:00
parent e8d3da3c75
commit 3dda2fe0e2
2 changed files with 26 additions and 3 deletions

View File

@ -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> 2005-01-31 Alexander Gottwald <ago at freedesktop dot org>
* winmultiwindowwindow.c * winmultiwindowwindow.c

View File

@ -148,6 +148,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
WNDCLASS wc; WNDCLASS wc;
RECT rcClient, rcWorkArea; RECT rcClient, rcWorkArea;
DWORD dwWindowStyle; DWORD dwWindowStyle;
BOOL fForceShowWindow = FALSE;
char szTitle[256]; char szTitle[256];
winDebug ("winCreateBoundingWindowWindowed - User w: %d h: %d\n", winDebug ("winCreateBoundingWindowWindowed - User w: %d h: %d\n",
@ -169,9 +170,19 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
#endif #endif
) )
{ {
dwWindowStyle |= WS_CAPTION; /* Try to handle startup via run.exe. run.exe instructs Windows to
if (pScreenInfo->fScrollbars) * hide all created windows. Detect this case and make sure the
dwWindowStyle |= WS_THICKFRAME | WS_MAXIMIZEBOX; * 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 else
dwWindowStyle |= WS_POPUP; dwWindowStyle |= WS_POPUP;
@ -346,6 +357,12 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
winDebug ("winCreateBoundingWindowWindowed - CreateWindowEx () returned\n"); winDebug ("winCreateBoundingWindowWindowed - CreateWindowEx () returned\n");
#endif #endif
if (fForceShowWindow)
{
ErrorF("winCreateBoundingWindowWindowed - Setting normal windowstyle\n");
ShowWindow(*phwnd, SW_SHOW);
}
/* Get the client area coordinates */ /* Get the client area coordinates */
if (!GetClientRect (*phwnd, &rcClient)) if (!GetClientRect (*phwnd, &rcClient))
{ {