dri: destory drawable in time to fix deadlock
Xid may be reused by Xorg, this may cause deadlock issue
dri: destory drawable in time to fix deadlock
Xid may be reused by Xorg, this may cause deadlock issue.
1. xid = xcb_generate_id && window1 = xcb_create_window
2. glXMakeCurrent(display, xid, context)
3. glXMakeCurrent(display, None, NULL) && xcb_destroy_window window1
4. xid = xcb_generate_id && window2 = xcb_create_window
5. glXMakeCurrent(display, xid, context);
If xid get the same id in step#4 and step#1, the drawable bind to
window1 can not be released and will be resued. If the drawable be
resued, special_event cat not be setup for window2 and Xorg can not
send present event to drawable. The drawable will blocked to wait
the event.
We actually met this issue. Release the drawable in time can fix
this issue when do glXMakeCurrent(display, None, NULL).
Signed-off-by: Chaojiang Luo <luochaojiang@uniontech.com>
Edited by ChaojiangLuo