summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-15 15:51:32 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-19 12:32:34 -0700
commit90e612dcbe370da095d317fac62c80ac2447fa0b (patch)
tree2082dfe8f248626ea0decea4c89de47e1efe535d /Xext
parent8033fb6c9792820a82fbdff6a14ff8a7a141ba74 (diff)
Use WriteEventsToClient rather than TryClientEvents where possible.
If filter is NoEventMask (aka CantBeFiltered), grab is null, and the first event is not in the set of "critical events", then TryClientEvents simply calls WriteEventsToClient. In that case, it returns 0 for fake or dead clients, and 1 otherwise. Inline for this special case. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'Xext')
-rw-r--r--Xext/xvmain.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 45d59462a..f6d39d030 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -535,8 +535,7 @@ XvdiSendVideoNotify(XvPortPtr pPort, DrawablePtr pDraw, int reason)
event.u.videoNotify.drawable = pDraw->id;
event.u.videoNotify.port = pPort->id;
event.u.videoNotify.reason = reason;
- TryClientEvents(pn->client, NULL, (xEventPtr)&event, 1,
- NoEventMask, NoEventMask, NullGrab);
+ WriteEventsToClient(pn->client, 1, (xEventPtr)&event);
pn = pn->next;
}
@@ -563,8 +562,7 @@ XvdiSendPortNotify(
event.u.portNotify.port = pPort->id;
event.u.portNotify.attribute = attribute;
event.u.portNotify.value = value;
- TryClientEvents(pn->client, NULL, (xEventPtr)&event, 1,
- NoEventMask, NoEventMask, NullGrab);
+ WriteEventsToClient(pn->client, 1, (xEventPtr)&event);
pn = pn->next;
}