Skinned CMDL fix

This commit is contained in:
Jack Andersen 2019-05-08 13:38:22 -10:00
parent 233d13ceb9
commit 80d334ec69
2 changed files with 5 additions and 3 deletions

2
hecl

@ -1 +1 @@
Subproject commit 43536e34f1d820c7b88c71f77c3ccd7b3d7bc35c
Subproject commit b2bd959c141af761f981d123316df87a86653e7a

View File

@ -245,7 +245,6 @@ int main(int argc, const char** argv) {
int x11Fd = ConnectionNumber(xDisp);
/* Spawn client thread */
bool clientRunning = true;
std::mutex initmt;
std::condition_variable initcv;
std::unique_lock<std::mutex> outerLk(initmt);
@ -260,7 +259,6 @@ int main(int argc, const char** argv) {
XUnlockDisplay(xDisp);
renderer.Run(UpdatePercent);
clientRunning = false;
XLockDisplay(xDisp);
XClientMessageEvent exitEvent = {};
@ -270,10 +268,12 @@ int main(int argc, const char** argv) {
XSendEvent(xDisp, windowId, 0, 0, reinterpret_cast<XEvent*>(&exitEvent));
XFlush(xDisp);
XUnlockDisplay(xDisp);
pthread_kill(mainThread, SIGUSR2);
});
initcv.wait(outerLk);
/* Begin application event loop */
bool clientRunning = true;
while (clientRunning) {
fd_set fds;
FD_ZERO(&fds);
@ -291,6 +291,8 @@ int main(int argc, const char** argv) {
XNextEvent(xDisp, &event);
if (XFilterEvent(&event, None))
continue;
if (event.type == ClientMessage)
clientRunning = false;
}
XUnlockDisplay(xDisp);
}