From 9311250c22708f19cc92c19069012cfec705b87e Mon Sep 17 00:00:00 2001 From: crs Date: Wed, 3 Sep 2003 21:21:22 +0000 Subject: [PATCH] Fixed uses of X11 display without mutex held. --- lib/platform/CXWindowsScreen.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/platform/CXWindowsScreen.cpp b/lib/platform/CXWindowsScreen.cpp index 2dd1949d..3de7bc06 100644 --- a/lib/platform/CXWindowsScreen.cpp +++ b/lib/platform/CXWindowsScreen.cpp @@ -326,6 +326,8 @@ CXWindowsScreen::close() void CXWindowsScreen::enable() { + CLock lock(&m_mutex); + if (!m_isPrimary) { // get the keyboard control state XKeyboardState keyControl; @@ -347,6 +349,8 @@ CXWindowsScreen::enable() void CXWindowsScreen::disable() { + CLock lock(&m_mutex); + // release input context focus if (m_ic != NULL) { XUnsetICFocus(m_ic); @@ -1761,8 +1765,6 @@ CXWindowsScreen::warpCursorNoFlush(SInt32 x, SInt32 y) LOG((CLOG_DEBUG2 "warped to %d,%d", x, y)); } -// ------------------ - void CXWindowsScreen::updateButtons() {