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:
parent
c22059b433
commit
745c5421be
|
@ -251,6 +251,12 @@ CXWindowsSecondaryScreen::keyUp(KeyID key,
|
||||||
m_fakeKeys[keycode] = false;
|
m_fakeKeys[keycode] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CXWindowsSecondaryScreen::flush(Display* display) const
|
||||||
|
{
|
||||||
|
XFlush(display);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CXWindowsSecondaryScreen::mouseDown(ButtonID button)
|
CXWindowsSecondaryScreen::mouseDown(ButtonID button)
|
||||||
{
|
{
|
||||||
|
@ -258,7 +264,7 @@ CXWindowsSecondaryScreen::mouseDown(ButtonID button)
|
||||||
if (xButton != 0) {
|
if (xButton != 0) {
|
||||||
CDisplayLock display(m_screen);
|
CDisplayLock display(m_screen);
|
||||||
XTestFakeButtonEvent(display, xButton, True, CurrentTime);
|
XTestFakeButtonEvent(display, xButton, True, CurrentTime);
|
||||||
XSync(display, False);
|
flush(display);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +275,7 @@ CXWindowsSecondaryScreen::mouseUp(ButtonID button)
|
||||||
if (xButton != 0) {
|
if (xButton != 0) {
|
||||||
CDisplayLock display(m_screen);
|
CDisplayLock display(m_screen);
|
||||||
XTestFakeButtonEvent(display, xButton, False, CurrentTime);
|
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, True, CurrentTime);
|
||||||
XTestFakeButtonEvent(display, xButton, False, CurrentTime);
|
XTestFakeButtonEvent(display, xButton, False, CurrentTime);
|
||||||
}
|
}
|
||||||
XSync(display, False);
|
flush(display);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -526,7 +532,7 @@ CXWindowsSecondaryScreen::destroyWindow()
|
||||||
XTestGrabControl(display, False);
|
XTestGrabControl(display, False);
|
||||||
|
|
||||||
// update
|
// update
|
||||||
XSync(display, False);
|
flush(display);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -583,7 +589,7 @@ CXWindowsSecondaryScreen::warpCursor(SInt32 x, SInt32 y)
|
||||||
XTestFakeMotionEvent(display, DefaultScreen(pDisplay),
|
XTestFakeMotionEvent(display, DefaultScreen(pDisplay),
|
||||||
x, y, CurrentTime);
|
x, y, CurrentTime);
|
||||||
}
|
}
|
||||||
XSync(display, False);
|
flush(display);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1192,7 +1198,7 @@ CXWindowsSecondaryScreen::doKeystrokes(const Keystrokes& keys, SInt32 count)
|
||||||
}
|
}
|
||||||
|
|
||||||
// update
|
// update
|
||||||
XSync(display, False);
|
flush(display);
|
||||||
}
|
}
|
||||||
|
|
||||||
CXWindowsSecondaryScreen::ModifierMask
|
CXWindowsSecondaryScreen::ModifierMask
|
||||||
|
|
|
@ -113,6 +113,8 @@ private:
|
||||||
typedef std::map<KeySym, KeySyms> KeySymsMap;
|
typedef std::map<KeySym, KeySyms> KeySymsMap;
|
||||||
typedef std::map<KeyButton, KeyCode> ServerKeyMap;
|
typedef std::map<KeyButton, KeyCode> ServerKeyMap;
|
||||||
|
|
||||||
|
void flush(Display*) const;
|
||||||
|
|
||||||
unsigned int mapButton(ButtonID button) const;
|
unsigned int mapButton(ButtonID button) const;
|
||||||
|
|
||||||
ModifierMask mapKey(Keystrokes&, KeyCode&, KeyID,
|
ModifierMask mapKey(Keystrokes&, KeyCode&, KeyID,
|
||||||
|
|
Loading…
Reference in New Issue