aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-06-19 16:11:28 +0200
committermarha <marha@users.sourceforge.net>2013-06-19 16:13:17 +0200
commit6ac57d622cdabb2db9f8dce51f0313892e6bd1aa (patch)
tree02bc19839312715a18a9988908f0ce97b26f7428
parent2aac4e532f0def350ef3faea22627f3033488187 (diff)
downloadvcxsrv-6ac57d622cdabb2db9f8dce51f0313892e6bd1aa.tar.gz
vcxsrv-6ac57d622cdabb2db9f8dce51f0313892e6bd1aa.tar.bz2
vcxsrv-6ac57d622cdabb2db9f8dce51f0313892e6bd1aa.zip
Do not use transparent window for the opengl window. It generates unnecessary flickering.
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c4
-rw-r--r--xorg-server/hw/xwin/glx/winpriv.c16
-rw-r--r--xorg-server/hw/xwin/winglobals.c5
-rw-r--r--xorg-server/hw/xwin/winwindow.h8
4 files changed, 19 insertions, 14 deletions
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;
diff --git a/xorg-server/hw/xwin/winglobals.c b/xorg-server/hw/xwin/winglobals.c
index 58dec7833..32f09f2bb 100644
--- a/xorg-server/hw/xwin/winglobals.c
+++ b/xorg-server/hw/xwin/winglobals.c
@@ -103,6 +103,11 @@ Window g_iClipboardWindow = None;
Atom g_atomLastOwnedSelection = None;
#endif
+const char WIN_WINDOW_PROP[]= "vcxsrv_window_prop_rl";
+const char WIN_WID_PROP[]= "vcxsrv_wid_prop_rl";
+const char WIN_NEEDMANAGE_PROP[]= "vcxsrv_override_redirect_prop_rl";
+const char WIN_SCR_PROP[]= "vcxsrv_screen_prop_rl";
+
/*
* Re-initialize global variables that are invalidated
* by a server reset.
diff --git a/xorg-server/hw/xwin/winwindow.h b/xorg-server/hw/xwin/winwindow.h
index bc4ed5abe..0b4713a27 100644
--- a/xorg-server/hw/xwin/winwindow.h
+++ b/xorg-server/hw/xwin/winwindow.h
@@ -47,15 +47,15 @@
#define WINDOW_CLASS "VcXsrv/x"
#define WINDOW_TITLE PROJECT_NAME " Server - Display %s:%s.%d"
#define WINDOW_TITLE_XDMCP PROJECT_NAME " Server - %s - Display %s:%s.%d"
-#define WIN_SCR_PROP "vcxsrv_screen_prop rl"
+extern const char WIN_SCR_PROP[];
#define WINDOW_CLASS_X "vcxsrv/x X rl"
#define WINDOW_TITLE_X PROJECT_NAME " X"
-#define WIN_WINDOW_PROP "vcxsrv_window_prop_rl"
+extern const char WIN_WINDOW_PROP[];
#ifdef HAS_DEVWINDOWS
#define WIN_MSG_QUEUE_FNAME "/dev/windows"
#endif
-#define WIN_WID_PROP "vcxsrv_wid_prop_rl"
-#define WIN_NEEDMANAGE_PROP "vcxsrv_override_redirect_prop_rl"
+extern const char WIN_WID_PROP[];
+extern const char WIN_NEEDMANAGE_PROP[];
#define VCXSRV_SIGNATURE 0xdeaddeadL