aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/dispatch.c')
-rw-r--r--xorg-server/dix/dispatch.c51
1 files changed, 46 insertions, 5 deletions
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index 2474c2f3b..87b27dfa6 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -104,6 +104,10 @@ Equipment Corporation.
#include <version-config.h>
#endif
+#ifdef CreateWindow
+#undef CreateWindow
+#endif
+
#ifdef PANORAMIX_DEBUG
#include <stdio.h>
int ProcInitialConnection();
@@ -395,6 +399,9 @@ Dispatch(void)
start_tick = SmartScheduleTime;
while (!isItTimeToYield)
{
+#ifdef XSERVER_DTRACE
+ CARD8 StartMajorOp;
+#endif
if (*icheck[0] != *icheck[1])
ProcessInputEvents();
@@ -419,7 +426,8 @@ Dispatch(void)
client->sequence++;
#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_START(LookupMajorName(MAJOROP), MAJOROP,
+ StartMajorOp=MAJOROP;
+ XSERVER_REQUEST_START(LookupMajorName(StartMajorOp), StartMajorOp,
((xReq *)client->requestBuffer)->length,
client->index, client->requestBuffer);
#endif
@@ -432,8 +440,28 @@ Dispatch(void)
XaceHookAuditEnd(client, result);
}
#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP,
- client->sequence, client->index, result);
+ if (result!=Success)
+ {
+ char Message[255];
+ sprintf(Message,"ERROR: %s (0x%x)",LookupMajorName(StartMajorOp),client->errorValue);
+ XSERVER_REQUEST_DONE(Message, MAJOROP,
+ client->sequence, client->index, result);
+ }
+ else
+ {
+ if (StartMajorOp!=MAJOROP)
+ {
+ char Message[255];
+ sprintf(Message,"Changed request: %s -> %s",LookupMajorName(StartMajorOp),LookupMajorName(MAJOROP));
+ XSERVER_REQUEST_DONE(Message, MAJOROP,
+ client->sequence, client->index, result);
+ }
+ else
+ {
+ XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP,
+ client->sequence, client->index, result);
+ }
+ }
#endif
if (client->noClientException != Success)
@@ -946,6 +974,13 @@ ProcGetGeometry(ClientPtr client)
return Success;
}
+#ifdef WIN32
+/* Do not return the clipboard window in ProcQueryTree, cause this may cause
+ the clipboard client being closed when connecting through xdmcp.
+*/
+extern Window g_iClipboardWindow;
+
+#endif
int
ProcQueryTree(ClientPtr client)
@@ -970,7 +1005,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;
@@ -979,7 +1017,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;