mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-05 12:15:46 +00:00
[host] xcb: fixed early start of pointer thread by adding xcb_start
This commit is contained in:
parent
3a8cb6a613
commit
6c76d6ada5
1 changed files with 14 additions and 7 deletions
|
@ -174,13 +174,6 @@ static bool xcb_init(void)
|
||||||
}
|
}
|
||||||
free(version_reply);
|
free(version_reply);
|
||||||
|
|
||||||
if (!lgCreateThread("XCBPointer", pointerThread, NULL, &this->pointerThread))
|
|
||||||
{
|
|
||||||
DEBUG_ERROR("Failed to create the XCBPointer thread");
|
|
||||||
xcb_deinit();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->initialized = true;
|
this->initialized = true;
|
||||||
return true;
|
return true;
|
||||||
fail:
|
fail:
|
||||||
|
@ -188,6 +181,19 @@ fail:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool xcb_start(void)
|
||||||
|
{
|
||||||
|
this->stop = false;
|
||||||
|
|
||||||
|
if (!lgCreateThread("XCBPointer", pointerThread, NULL, &this->pointerThread))
|
||||||
|
{
|
||||||
|
DEBUG_ERROR("Failed to create the XCBPointer thread");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static void xcb_stop(void)
|
static void xcb_stop(void)
|
||||||
{
|
{
|
||||||
this->stop = true;
|
this->stop = true;
|
||||||
|
@ -375,6 +381,7 @@ struct CaptureInterface Capture_XCB =
|
||||||
.getName = xcb_getName,
|
.getName = xcb_getName,
|
||||||
.create = xcb_create,
|
.create = xcb_create,
|
||||||
.init = xcb_init,
|
.init = xcb_init,
|
||||||
|
.start = xcb_start,
|
||||||
.stop = xcb_stop,
|
.stop = xcb_stop,
|
||||||
.deinit = xcb_deinit,
|
.deinit = xcb_deinit,
|
||||||
.free = xcb_free,
|
.free = xcb_free,
|
||||||
|
|
Loading…
Reference in a new issue