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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user