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

Adam Jackson ajax at nwnk.net
Mon Oct 23 15:00:12 UTC 2017


On Mon, 2017-10-23 at 16:26 +0200, Michel Dänzer wrote:
> 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? If so, we might
> > want to fix that library?
> 
> Looking at the Mesa code, it uses xcb_generate_id to generate the event
> ID. AFAICT the XCB code is properly checking and only queuing special
> events with a matching event ID, so the only possible explanation seems
> that xcb_generate_id ends up generating the same ID for multiple
> clients. Is that plausible?

It shouldn't be. They're XIDs, they're partitioned by client. If xcb
ever generated an XID outside the client's range the server would throw
BadIDChoice in present_select_input().

- ajax


More information about the xorg-devel mailing list