summaryrefslogtreecommitdiff
path: root/present/present.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-10-02 11:33:43 +0200
committerMichel Dänzer <michel@daenzer.net>2017-11-23 10:28:06 +0100
commit559954aaa8d811a22cf918cc16a7d618e12201a0 (patch)
tree359b6138e2a5951d55bf44e2a0a7b1edc925cd35 /present/present.c
parentfc7fb5bbe1c8f787e53500b9a2ca4af815f310d1 (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>
Diffstat (limited to 'present/present.c')
-rw-r--r--present/present.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/present/present.c b/present/present.c
index 176e89c0b..a8f116643 100644
--- a/present/present.c
+++ b/present/present.c
@@ -206,13 +206,13 @@ present_vblank_notify(present_vblank_ptr vblank, CARD8 kind, CARD8 mode, uint64_
int n;
if (vblank->window)
- present_send_complete_notify(vblank->window, kind, mode, vblank->serial, ust, crtc_msc - vblank->msc_offset);
+ present_send_complete_notify(vblank->window, kind, mode, vblank->serial, ust, crtc_msc - vblank->msc_offset, vblank->client);
for (n = 0; n < vblank->num_notifies; n++) {
WindowPtr window = vblank->notifies[n].window;
CARD32 serial = vblank->notifies[n].serial;
if (window)
- present_send_complete_notify(window, kind, mode, serial, ust, crtc_msc - vblank->msc_offset);
+ present_send_complete_notify(window, kind, mode, serial, ust, crtc_msc - vblank->msc_offset, vblank->client);
}
}
@@ -772,6 +772,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
int
present_pixmap(WindowPtr window,
PixmapPtr pixmap,
+ ClientPtr client,
CARD32 serial,
RegionPtr valid,
RegionPtr update,
@@ -882,6 +883,7 @@ present_pixmap(WindowPtr window,
xorg_list_append(&vblank->window_list, &window_priv->vblank);
xorg_list_init(&vblank->event_queue);
+ vblank->client = client;
vblank->screen = screen;
vblank->window = window;
vblank->pixmap = pixmap;
@@ -1001,6 +1003,7 @@ present_abort_vblank(ScreenPtr screen, RRCrtcPtr crtc, uint64_t event_id, uint64
int
present_notify_msc(WindowPtr window,
+ ClientPtr client,
CARD32 serial,
uint64_t target_msc,
uint64_t divisor,
@@ -1008,6 +1011,7 @@ present_notify_msc(WindowPtr window,
{
return present_pixmap(window,
NULL,
+ client,
serial,
NULL, NULL,
0, 0,