Changed XSync() to XFlush() in X windows secondary screen. This

doesn't appear to have any negative consequences and may prevent
synergy from freezing when some X client (probably the window
manager) grabs the server.
This commit is contained in:
crs 2003-07-13 16:57:08 +00:00
parent c22059b433
commit 745c5421be
2 changed files with 14 additions and 6 deletions

View File

@ -251,6 +251,12 @@ CXWindowsSecondaryScreen::keyUp(KeyID key,
m_fakeKeys[keycode] = false;
}
void
CXWindowsSecondaryScreen::flush(Display* display) const
{
XFlush(display);
}
void
CXWindowsSecondaryScreen::mouseDown(ButtonID button)
{
@ -258,7 +264,7 @@ CXWindowsSecondaryScreen::mouseDown(ButtonID button)
if (xButton != 0) {
CDisplayLock display(m_screen);
XTestFakeButtonEvent(display, xButton, True, CurrentTime);
XSync(display, False);
flush(display);
}
}
@ -269,7 +275,7 @@ CXWindowsSecondaryScreen::mouseUp(ButtonID button)
if (xButton != 0) {
CDisplayLock display(m_screen);
XTestFakeButtonEvent(display, xButton, False, CurrentTime);
XSync(display, False);
flush(display);
}
}
@ -300,7 +306,7 @@ CXWindowsSecondaryScreen::mouseWheel(SInt32 delta)
XTestFakeButtonEvent(display, xButton, True, CurrentTime);
XTestFakeButtonEvent(display, xButton, False, CurrentTime);
}
XSync(display, False);
flush(display);
}
void
@ -526,7 +532,7 @@ CXWindowsSecondaryScreen::destroyWindow()
XTestGrabControl(display, False);
// update
XSync(display, False);
flush(display);
}
}
@ -583,7 +589,7 @@ CXWindowsSecondaryScreen::warpCursor(SInt32 x, SInt32 y)
XTestFakeMotionEvent(display, DefaultScreen(pDisplay),
x, y, CurrentTime);
}
XSync(display, False);
flush(display);
}
void
@ -1192,7 +1198,7 @@ CXWindowsSecondaryScreen::doKeystrokes(const Keystrokes& keys, SInt32 count)
}
// update
XSync(display, False);
flush(display);
}
CXWindowsSecondaryScreen::ModifierMask

View File

@ -113,6 +113,8 @@ private:
typedef std::map<KeySym, KeySyms> KeySymsMap;
typedef std::map<KeyButton, KeyCode> ServerKeyMap;
void flush(Display*) const;
unsigned int mapButton(ButtonID button) const;
ModifierMask mapKey(Keystrokes&, KeyCode&, KeyID,