diff options
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwindow.c')
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowwindow.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c index c318f77ad..81d368b5c 100644 --- a/xorg-server/hw/xwin/winmultiwindowwindow.c +++ b/xorg-server/hw/xwin/winmultiwindowwindow.c @@ -625,9 +625,25 @@ winUpdateWindowsWindow (WindowPtr pWin) }
else if (hWnd != NULL)
{
- /* Destroy the Windows window if its parents are destroyed */
- winDestroyWindowsWindow (pWin);
- assert (pWinPriv->hWnd == NULL);
+ if (pWinPriv->OpenGlWindow)
+ {
+ HWND hParentWnd;
+
+ {
+ winWindowPriv(pWin->parent);
+ ErrorF("Window handle = %x\n",pWinPriv->hWnd);
+ hParentWnd=pWinPriv->hWnd;
+ }
+ SetParent(pWinPriv->hWnd,hParentWnd);
+ SetWindowPos(pWinPriv->hWnd,NULL,0,0,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_SHOWWINDOW);
+ }
+ else
+ {
+ /* Destroy the Windows window if its parents are destroyed */
+ /* First check if we need to release the DC when it is an opengl window */
+ winDestroyWindowsWindow (pWin);
+ assert (pWinPriv->hWnd == NULL);
+ }
}
#if CYGMULTIWINDOW_DEBUG
|