Fixed uses of X11 display without mutex held.

This commit is contained in:
crs 2003-09-03 21:21:22 +00:00
parent 809a347333
commit 9311250c22
1 changed files with 4 additions and 2 deletions

View File

@ -326,6 +326,8 @@ CXWindowsScreen::close()
void void
CXWindowsScreen::enable() CXWindowsScreen::enable()
{ {
CLock lock(&m_mutex);
if (!m_isPrimary) { if (!m_isPrimary) {
// get the keyboard control state // get the keyboard control state
XKeyboardState keyControl; XKeyboardState keyControl;
@ -347,6 +349,8 @@ CXWindowsScreen::enable()
void void
CXWindowsScreen::disable() CXWindowsScreen::disable()
{ {
CLock lock(&m_mutex);
// release input context focus // release input context focus
if (m_ic != NULL) { if (m_ic != NULL) {
XUnsetICFocus(m_ic); XUnsetICFocus(m_ic);
@ -1761,8 +1765,6 @@ CXWindowsScreen::warpCursorNoFlush(SInt32 x, SInt32 y)
LOG((CLOG_DEBUG2 "warped to %d,%d", x, y)); LOG((CLOG_DEBUG2 "warped to %d,%d", x, y));
} }
// ------------------
void void
CXWindowsScreen::updateButtons() CXWindowsScreen::updateButtons()
{ {