aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/glx/winpriv.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-01 19:01:42 +0000
committermarha <marha@users.sourceforge.net>2009-12-01 19:01:42 +0000
commitc8a15397749bed81dce209704b75c2f1a413ab7a (patch)
tree76c61396cad0802f1ec15d1d19c84e55ee088281 /xorg-server/hw/xwin/glx/winpriv.c
parent0b8dc9dc465f6c396d96be1fa4c42121129beb6c (diff)
downloadvcxsrv-c8a15397749bed81dce209704b75c2f1a413ab7a.tar.gz
vcxsrv-c8a15397749bed81dce209704b75c2f1a413ab7a.tar.bz2
vcxsrv-c8a15397749bed81dce209704b75c2f1a413ab7a.zip
Enabled native opengl for xdmcp
Diffstat (limited to 'xorg-server/hw/xwin/glx/winpriv.c')
-rw-r--r--xorg-server/hw/xwin/glx/winpriv.c62
1 files changed, 60 insertions, 2 deletions
diff --git a/xorg-server/hw/xwin/glx/winpriv.c b/xorg-server/hw/xwin/glx/winpriv.c
index 65477afb2..671d81a5b 100644
--- a/xorg-server/hw/xwin/glx/winpriv.c
+++ b/xorg-server/hw/xwin/glx/winpriv.c
@@ -11,6 +11,8 @@
#include "winpriv.h"
#include "winwindow.h"
+extern Bool g_fXdmcpEnabled;
+
void
winCreateWindowsWindow (WindowPtr pWin);
/**
@@ -72,8 +74,8 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo)
winCreateWindowsWindow(pWin);
ErrorF("winGetWindowInfo: forcing window to exist...\n");
}
- if (pWinPriv->hWnd != NULL) {
-
+ if (pWinPriv->hWnd != NULL)
+ {
/* copy size and window handle */
pWinInfo->rect = rect_extends;
pWinInfo->hwnd = pWinPriv->hWnd;
@@ -98,6 +100,59 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo)
return;
}
+ else if (g_fXdmcpEnabled)
+ {
+ winWindowPriv(pWin);
+
+ if (pWinPriv == NULL)
+ {
+ ErrorF("winGetWindowInfo: window has no privates\n");
+ return;
+ }
+ if (pWinPriv->hWnd == NULL)
+ {
+ if (!((pWin->drawable.x==0) &&
+ (pWin->drawable.y==0) &&
+ (pWin->drawable.width==pScreen->width) &&
+ (pWin->drawable.height==pScreen->height)
+ )
+ )
+ {
+ int ExtraClass=(pWin->realized)?WS_VISIBLE: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.width,
+ pWin->drawable.height,
+ pWinScreen->hwndScreen,
+ NULL,
+ GetModuleHandle(NULL),
+ NULL);
+ pWinPriv->GlCtxWnd=TRUE;
+ /* copy size and window handle */
+ pWinInfo->hwnd = pWinPriv->hWnd;
+ }
+ else
+ {
+ pWinInfo->hwnd = pWinScreen->hwndScreen;
+ }
+ pWinInfo->rect = rect_extends;
+ if (pWinInfo->hrgn)
+ {
+ DeleteObject(pWinInfo->hrgn);
+ pWinInfo->hrgn = NULL;
+ }
+ }
+ else
+ {
+ pWinInfo->rect = rect_extends;
+ pWinInfo->hwnd = pWinPriv->hWnd;
+ pWinInfo->hrgn = NULL;
+ }
+ }
#endif
#ifdef XWIN_MULTIWINDOWEXTWM
/* check for multiwindow external wm mode */
@@ -160,5 +215,8 @@ winCheckScreenAiglxIsSupported(ScreenPtr pScreen)
return TRUE;
#endif
+ if (g_fXdmcpEnabled)
+ return TRUE;
+
return FALSE;
}