提交 756fec35 编写于 作者: J jp9000

linux-capture: Clear x events when exiting handler

This is probably not necessary but might fix an issue where errors pass
through to other parts of the program, possibly causing the crash on
exit related to the xcomposite capture.
上级 c392164f
......@@ -373,6 +373,8 @@ void XErrorLock::lock()
void XErrorLock::unlock()
{
if (islock) {
XSync(XCompcap::disp(), 0);
curErrorTarget = 0;
XSetErrorHandler(prevhandler);
prevhandler = 0;
......
......@@ -234,6 +234,9 @@ static Window getWindowFromString(std::string wstr)
static void xcc_cleanup(XCompcapMain_private *p)
{
PLock lock(&p->lock);
XErrorLock xlock;
if (p->gltex) {
gs_texture_destroy(p->gltex);
p->gltex = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册