xwayland: Stop using event address as event_id

Nothing should be relying on this anymore, so use a counter like other
places in the tree instead. This ensures that the event_id doesn't get
cast back into a pointer again in future, and also may be slightly less
confusing in cases where calloc reuses an address as debug logs would
show the same event_id for those but now they will be distinct.

Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
This commit is contained in:
Jessica Clarke 2022-12-05 19:58:21 +00:00 committed by Olivier Fourdan
parent bfe8f54924
commit 13e513d2f0

View File

@ -930,6 +930,7 @@ xwl_present_pixmap(WindowPtr window,
present_notify_ptr notifies,
int num_notifies)
{
static uint64_t xwl_present_event_id;
uint64_t ust = 0;
uint64_t target_msc;
uint64_t crtc_msc = 0;
@ -995,7 +996,7 @@ xwl_present_pixmap(WindowPtr window,
return BadAlloc;
}
vblank->event_id = (uintptr_t)event;
vblank->event_id = ++xwl_present_event_id;
/* Xwayland presentations always complete (at least) one frame after they
* are executed