diff options
author | marha <marha@users.sourceforge.net> | 2010-09-15 16:42:32 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-09-15 16:42:32 +0000 |
commit | cc9377f72bba077839e2848641e43e169f9fcd54 (patch) | |
tree | ac2f1b46604afd4aff4d327e85a0b4a1e66f4b26 /xorg-server/hw/xwin/glx/winpriv.c | |
parent | 2ddb14008968ea365e3d395487cad2bfe154da9d (diff) | |
download | vcxsrv-cc9377f72bba077839e2848641e43e169f9fcd54.tar.gz vcxsrv-cc9377f72bba077839e2848641e43e169f9fcd54.tar.bz2 vcxsrv-cc9377f72bba077839e2848641e43e169f9fcd54.zip |
Solved some wgl problems. The game xmoto is now running.
Diffstat (limited to 'xorg-server/hw/xwin/glx/winpriv.c')
-rw-r--r-- | xorg-server/hw/xwin/glx/winpriv.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/xorg-server/hw/xwin/glx/winpriv.c b/xorg-server/hw/xwin/glx/winpriv.c index ea7ff0717..6c16c31ae 100644 --- a/xorg-server/hw/xwin/glx/winpriv.c +++ b/xorg-server/hw/xwin/glx/winpriv.c @@ -55,8 +55,40 @@ HWND winGetWindowInfo(WindowPtr pWin) if (pWinPriv->hWnd == NULL) { - winCreateWindowsWindow(pWin); - ErrorF("winGetWindowInfo: forcing window to exist...\n"); + if (pWin->parent && pWin->parent->parent) + { + int ExtraClass=(pWin->realized)?WS_VISIBLE:0; + HWND hWndParent; + WindowPtr pParent=pWin->parent; + while (pParent) + { + winWindowPriv(pParent); + hWndParent=pWinPriv->hWnd; + if (hWndParent) + break; + pParent=pParent->parent; + } + if (!hWndParent) + hWndParent=hwnd; + pWinPriv->hWnd=CreateWindowExA(WS_EX_TRANSPARENT, + WIN_GL_WINDOW_CLASS, + "", + WS_CHILD |WS_CLIPSIBLINGS | WS_CLIPCHILDREN | ExtraClass, + pWin->drawable.x, + pWin->drawable.y, + pWin->drawable.width, + pWin->drawable.height, + hWndParent, + NULL, + GetModuleHandle(NULL), + NULL); + pWinPriv->GlCtxWnd=TRUE; + } + else + { + winCreateWindowsWindow(pWin); + ErrorF("winGetWindowInfo: forcing window to exist...\n"); + } } if (pWinPriv->hWnd != NULL) { |