aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/dispatch.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-01-02 15:01:46 +0000
committermarha <marha@users.sourceforge.net>2010-01-02 15:01:46 +0000
commit351a21213a966c389574b50abf13a974c0aae022 (patch)
tree94572e2be33c011e92d6a950c9a506b7a6353800 /xorg-server/dix/dispatch.c
parente990b127f48882996bc24094cc4fad49d343bfe5 (diff)
downloadvcxsrv-351a21213a966c389574b50abf13a974c0aae022.tar.gz
vcxsrv-351a21213a966c389574b50abf13a974c0aae022.tar.bz2
vcxsrv-351a21213a966c389574b50abf13a974c0aae022.zip
Fixed problem of clipboard client being shutdown when connecting through xdmcp.
Diffstat (limited to 'xorg-server/dix/dispatch.c')
-rw-r--r--xorg-server/dix/dispatch.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index d431d4f75..b813136c7 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -1018,6 +1018,13 @@ ProcGetGeometry(ClientPtr client)
return(client->noClientException);
}
+#ifdef WIN32
+/* Do not return the clipboard window in ProcQueryTree, cause this may cause
+ the clipboard client being closed when connecting through xdmcp.
+*/
+extern int g_iClipboardWindow;
+
+#endif
int
ProcQueryTree(ClientPtr client)
@@ -1042,7 +1049,10 @@ ProcQueryTree(ClientPtr client)
reply.parent = (Window)None;
pHead = RealChildHead(pWin);
for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib)
- numChildren++;
+#ifdef WIN32
+ if (pChild->drawable.id!=g_iClipboardWindow)
+#endif
+ numChildren++;
if (numChildren)
{
int curChild = 0;
@@ -1051,7 +1061,10 @@ ProcQueryTree(ClientPtr client)
if (!childIDs)
return BadAlloc;
for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib)
- childIDs[curChild++] = pChild->drawable.id;
+#ifdef WIN32
+ if (pChild->drawable.id!=g_iClipboardWindow)
+#endif
+ childIDs[curChild++] = pChild->drawable.id;
}
reply.nChildren = numChildren;