aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/glx/winpriv.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-11-20 13:01:45 +0000
committermarha <marha@users.sourceforge.net>2009-11-20 13:01:45 +0000
commitd2d9977f1153b5222b34859a2cb22b957bfe3221 (patch)
treea732c0c90bbd06bbf003e23a3ec08300e154a51d /xorg-server/hw/xwin/glx/winpriv.c
parentda051c6af428703e746c6a1677e1dce032b86c41 (diff)
downloadvcxsrv-d2d9977f1153b5222b34859a2cb22b957bfe3221.tar.gz
vcxsrv-d2d9977f1153b5222b34859a2cb22b957bfe3221.tar.bz2
vcxsrv-d2d9977f1153b5222b34859a2cb22b957bfe3221.zip
Native glx is compiling and running now (although no acceleration is happening... to be investigated further)
Diffstat (limited to 'xorg-server/hw/xwin/glx/winpriv.c')
-rw-r--r--xorg-server/hw/xwin/glx/winpriv.c42
1 files changed, 33 insertions, 9 deletions
diff --git a/xorg-server/hw/xwin/glx/winpriv.c b/xorg-server/hw/xwin/glx/winpriv.c
index 3260ca95c..5c1aa529a 100644
--- a/xorg-server/hw/xwin/glx/winpriv.c
+++ b/xorg-server/hw/xwin/glx/winpriv.c
@@ -28,18 +28,31 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo)
/* a real window was requested */
if (pWin != NULL)
{
+ /* Initialize the size information */
+ RECT rect = {
+ pWin->drawable.x,
+ pWin->drawable.y,
+ pWin->drawable.x + pWin->drawable.width,
+ pWin->drawable.y + pWin->drawable.height
+ }, rect_extends;
/* Get the window and screen privates */
ScreenPtr pScreen = pWin->drawable.pScreen;
winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen);
winScreenInfoPtr pScreenInfo = NULL;
- if (pWinScreen == NULL)
+ rect_extends = rect;
+ OffsetRect(&rect_extends, -pWin->drawable.x, -pWin->drawable.y);
+
+ if (pWinScreen == NULL)
{
ErrorF("winGetWindowInfo: screen has no privates\n");
return;
}
pWinInfo->hwnd = pWinScreen->hwndScreen;
+ pWinInfo->hrgn = NULL;
+ pWinInfo->rect = rect;
+
pScreenInfo = pWinScreen->pScreenInfo;
#ifdef XWIN_MULTIWINDOW
@@ -59,13 +72,20 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo)
winCreateWindowsWindow(pWin);
ErrorF("winGetWindowInfo: forcing window to exist...\n");
}
-
- if (pWinPriv->hWnd != NULL)
- {
- /* copy window handle */
+ if (pWinPriv->hWnd != NULL) {
+
+ /* copy size and window handle */
+ pWinInfo->rect = rect_extends;
pWinInfo->hwnd = pWinPriv->hWnd;
- }
+ /* Copy window region */
+ if (pWinInfo->hrgn)
+ DeleteObject(pWinInfo->hrgn);
+ pWinInfo->hrgn = CreateRectRgn(0,0,0,0);
+ CombineRgn(pWinInfo->hrgn, pWinPriv->hRgn, pWinPriv->hRgn,
+ RGN_COPY);
+ }
+
return;
}
#endif
@@ -83,7 +103,8 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo)
if (pRLWinPriv->hWnd != NULL)
{
- /* copy window handle */
+ /* copy size and window handle */
+ pWinInfo->rect = rect_extends;
pWinInfo->hwnd = pRLWinPriv->hWnd;
}
return;
@@ -92,18 +113,21 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo)
}
else
{
+ RECT rect = {0, 0, 0, 0};
ScreenPtr pScreen = g_ScreenInfo[0].pScreen;
winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen);
pWinInfo->hwnd = NULL;
-
+ pWinInfo->hrgn = NULL;
+ pWinInfo->rect = rect;
+
if (pWinScreen == NULL)
{
ErrorF("winGetWindowInfo: screen has no privates\n");
return;
}
- ErrorF("winGetWindowInfo: returning root window\n");
+ winDebug("winGetWindowInfo: returning root window\n");
pWinInfo->hwnd = pWinScreen->hwndScreen;
}