summaryrefslogtreecommitdiff
path: root/present/present_event.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-10-02 11:33:43 +0200
committerAdam Jackson <ajax@redhat.com>2017-12-13 10:08:00 -0500
commit5c00e693631475679c1c2504e03177652ec7de28 (patch)
tree04d707af98551fdb10eaa1e4a86b9c4c3f28c26c /present/present_event.c
parenta4bd27bdc8e3569ffa67c1105a2e5cdf0f3de683 (diff)
present: Only send PresentCompleteNotify events to the presenting client
We were sending the events to all clients listening for them on the window. But clients can get confused by events from another client, and I can't imagine any case where receiving events from other clients would be required. v2: * Also restrict events sent to additional windows to the presenting client * Don't shorten line lengths Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 559954aaa8d811a22cf918cc16a7d618e12201a0)
Diffstat (limited to 'present/present_event.c')
-rw-r--r--present/present_event.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/present/present_event.c b/present/present_event.c
index c222dd5ff..ac6f2555a 100644
--- a/present/present_event.c
+++ b/present/present_event.c
@@ -146,7 +146,7 @@ present_register_complete_notify(present_complete_notify_proc proc)
}
void
-present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, uint64_t msc)
+present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, uint64_t msc, ClientPtr client)
{
present_window_priv_ptr window_priv = present_window_priv(window);
@@ -167,7 +167,8 @@ present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 se
present_event_ptr event;
for (event = window_priv->events; event; event = event->next) {
- if (event->mask & PresentCompleteNotifyMask) {
+ if (event->mask & PresentCompleteNotifyMask &&
+ client == event->client) {
cn.eid = event->id;
WriteEventsToClient(event->client, 1, (xEvent *) &cn);
}