loader/dri3: Destroy Present event context when destroying drawable v2
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 28 Jul 2016 08:44:49 +0000 (17:44 +0900)
committerMichel Dänzer <michel@daenzer.net>
Thu, 4 Aug 2016 06:45:43 +0000 (15:45 +0900)
commit5d191bafa26d2a88aa108823a2f3b9a321294fdc
treeb15d7ed5571bfa5acb56c6e4333a16409738fc07
parent1743c4184bdecd0c50e9f6fa17cafa84407fa929
loader/dri3: Destroy Present event context when destroying drawable v2

Without this, the X server may accumulate stale Present event contexts
if a client ends up creating and destroying DRI drawables for the same
window.

v2: Based on Chris Wilson's review:
* Use xcb_present_select_input_checked so that protocol errors
  generated by old X servers can be handled gracefully
* Use xcb_discard_reply() instead of free(xcb_request_check())
src/loader/loader_dri3_helper.c