[PATCH xserver] present: Only send PresentCompleteNotify events to the presenting client

Michel Dänzer michel at daenzer.net
Fri Oct 27 15:31:27 UTC 2017


On 20/10/17 09:58 PM, Keith Packard wrote:
> Michel Dänzer <michel at daenzer.net> writes:
> 
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> 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 reciving events from other clients would
>> be required.
> 
> While I agree that it's unlikely to be useful to send the event to all
> listening clients, there is a 'PRESENTEVENTID' in the CompleteNotify
> which clients "should" be using to check to see if the event being
> delivered is the one associated with their action.
> 
> Did we mess up in some client library and not do this?

Turns out it's way worse than that. The PresentPixmap and
PresentNotifyMSC requests don't take a PRESENTEVENTID parameter.
Instead, present_send_idle/complete_notify send every event to every
client which called PresentSelectInput for the window with the event
kind enabled in the event mask, and always set the event ID specified in
PresentSelectInput in the event sent to each client. This defeats the
purpose of the event ID and results in all events getting sent to and
processed by all listening clients.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 224 bytes
Desc: OpenPGP digital signature
URL: <https://lists.x.org/archives/xorg-devel/attachments/20171027/e725b586/attachment.sig>


More information about the xorg-devel mailing list