mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-08 21:03:54 +08:00
Fixed uses of X11 display without mutex held.
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user