aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/glx/winpriv.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-20 09:22:54 +0000
committermarha <marha@users.sourceforge.net>2010-09-20 09:22:54 +0000
commit97aaa22fb796662afd3ad4052d4f7d1c5945bb70 (patch)
treeba9fc06904f535fdda4336be7dda9ee180791914 /xorg-server/hw/xwin/glx/winpriv.c
parent9cf4320c9d18406a570d4472cbf1fe3ceaeaf555 (diff)
downloadvcxsrv-97aaa22fb796662afd3ad4052d4f7d1c5945bb70.tar.gz
vcxsrv-97aaa22fb796662afd3ad4052d4f7d1c5945bb70.tar.bz2
vcxsrv-97aaa22fb796662afd3ad4052d4f7d1c5945bb70.zip
opengl window was not always created/moved to the correct place
Diffstat (limited to 'xorg-server/hw/xwin/glx/winpriv.c')
-rw-r--r--xorg-server/hw/xwin/glx/winpriv.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/xorg-server/hw/xwin/glx/winpriv.c b/xorg-server/hw/xwin/glx/winpriv.c
index 6c16c31ae..c689bae08 100644
--- a/xorg-server/hw/xwin/glx/winpriv.c
+++ b/xorg-server/hw/xwin/glx/winpriv.c
@@ -57,6 +57,8 @@ HWND winGetWindowInfo(WindowPtr pWin)
{
if (pWin->parent && pWin->parent->parent)
{
+ int offsetx;
+ int offsety;
int ExtraClass=(pWin->realized)?WS_VISIBLE:0;
HWND hWndParent;
WindowPtr pParent=pWin->parent;
@@ -70,24 +72,35 @@ HWND winGetWindowInfo(WindowPtr pWin)
}
if (!hWndParent)
hWndParent=hwnd;
+ if (pParent)
+ {
+ offsetx=pParent->drawable.x;
+ offsety=pParent->drawable.y;
+ }
+ else
+ {
+ offsetx=0;
+ offsety=0;
+ }
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.x-offsetx,
+ pWin->drawable.y-offsety,
pWin->drawable.width,
pWin->drawable.height,
hWndParent,
NULL,
GetModuleHandle(NULL),
NULL);
+ winDebug("Window created %x %x %d %d %d %d\n",pWinPriv->hWnd,hWndParent,pWin->drawable.x-offsetx,pWin->drawable.y-offsety,pWin->drawable.width, pWin->drawable.height);
pWinPriv->GlCtxWnd=TRUE;
}
else
{
winCreateWindowsWindow(pWin);
- ErrorF("winGetWindowInfo: forcing window to exist...\n");
+ winDebug("winGetWindowInfo: forcing window to exist...\n");
}
}
if (pWinPriv->hWnd != NULL)