From 6ac57d622cdabb2db9f8dce51f0313892e6bd1aa Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 19 Jun 2013 16:11:28 +0200 Subject: Do not use transparent window for the opengl window. It generates unnecessary flickering. --- xorg-server/hw/xwin/glx/indirect.c | 4 ++-- xorg-server/hw/xwin/glx/winpriv.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'xorg-server/hw/xwin/glx') diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c index acda74da5..082c5ad3e 100644 --- a/xorg-server/hw/xwin/glx/indirect.c +++ b/xorg-server/hw/xwin/glx/indirect.c @@ -608,7 +608,7 @@ glxWinScreenProbe(ScreenPtr pScreen) WNDCLASSEX wc; glTestWndClass=1; wc.cbSize = sizeof(WNDCLASSEX); - wc.style = CS_OWNDC ; + wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC ; wc.lpfnWndProc = GlxWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; @@ -627,7 +627,7 @@ glxWinScreenProbe(ScreenPtr pScreen) hwnd = CreateWindowExA(0, WIN_GL_WINDOW_CLASS, "XWin GL Renderer Capabilities Test Window", - 0, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), + 0, 0, 0, 0, 0, NULL, NULL, g_hInstance, NULL); if (hwnd == NULL) LogMessage(X_ERROR, diff --git a/xorg-server/hw/xwin/glx/winpriv.c b/xorg-server/hw/xwin/glx/winpriv.c index 4f2bc21a8..1b8ec5a4a 100644 --- a/xorg-server/hw/xwin/glx/winpriv.c +++ b/xorg-server/hw/xwin/glx/winpriv.c @@ -79,18 +79,18 @@ winGetWindowInfo(WindowPtr pWin) offsetx=0; offsety=0; } - pWinPriv->hWnd=CreateWindowExA(WS_EX_TRANSPARENT, + pWinPriv->hWnd=CreateWindowExA(0, WIN_GL_WINDOW_CLASS, "", - WS_CHILD |WS_CLIPSIBLINGS | WS_CLIPCHILDREN | ExtraClass, + WS_CHILD |WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_DISABLED | ExtraClass, pWin->drawable.x-offsetx, pWin->drawable.y-offsety, pWin->drawable.width, pWin->drawable.height, hWndParent, NULL, - GetModuleHandle(NULL), - NULL); + g_hInstance, + pWin); 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->fWglUsed=TRUE; } @@ -124,18 +124,18 @@ winGetWindowInfo(WindowPtr pWin) ) { int ExtraClass=(pWin->realized)?WS_VISIBLE:0; - pWinPriv->hWnd=CreateWindowExA(WS_EX_TRANSPARENT, + pWinPriv->hWnd=CreateWindowExA(0, WIN_GL_WINDOW_CLASS, "", - WS_CHILD |WS_CLIPSIBLINGS | WS_CLIPCHILDREN | ExtraClass, + WS_CHILD |WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_DISABLED | ExtraClass, pWin->drawable.x, pWin->drawable.y, pWin->drawable.width, pWin->drawable.height, pWinScreen->hwndScreen, NULL, - GetModuleHandle(NULL), - NULL); + g_hInstance, + pWin); pWinPriv->fWglUsed=TRUE; /* copy size and window handle */ hwnd = pWinPriv->hWnd; -- cgit v1.2.3