Proper multithreaded locking for Xlib

This commit is contained in:
Jack Andersen
2015-11-11 18:31:59 -10:00
parent 4ee3e0f7aa
commit a2ffab3ff5
3 changed files with 52 additions and 31 deletions

View File

@@ -242,6 +242,7 @@ public:
if (FD_ISSET(m_xcbFd, &fds))
{
XLockDisplay(m_xDisp);
while (XPending(m_xDisp))
{
XEvent event;
@@ -256,6 +257,7 @@ public:
window->second->_incomingEvent(&event);
}
}
XUnlockDisplay(m_xDisp);
}
if (FD_ISSET(m_dbusFd, &fds))