mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-12 22:55:53 +08:00
Compare commits
7 Commits
v2.0.4-bet
...
v2.0.7-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f2c7099c5 | ||
|
|
3982e74d30 | ||
|
|
2006af9143 | ||
|
|
cbfa585fa7 | ||
|
|
dfb8d15010 | ||
|
|
426e81fa71 | ||
|
|
3d440547ee |
@@ -1,3 +1,3 @@
|
||||
# Synergy Core
|
||||
|
||||
Open source core legacy component of Synergy, keyboard and mouse sharing software
|
||||
This is the open source core component of Synergy, a keyboard and mouse sharing tool.
|
||||
|
||||
@@ -4,28 +4,29 @@
|
||||
# line. comments may appear anywhere the syntax permits.
|
||||
|
||||
section: screens
|
||||
# three hosts named: moe, larry, and curly
|
||||
# three hosts, named "moe", "larry", and "curly"
|
||||
moe:
|
||||
larry:
|
||||
curly:
|
||||
end
|
||||
|
||||
section: links
|
||||
# larry is to the right of moe and curly is above moe
|
||||
# for moe, larry is to the right and curly is above.
|
||||
moe:
|
||||
right = larry
|
||||
up = curly
|
||||
|
||||
# moe is to the left of larry and curly is above larry.
|
||||
# note that curly is above both moe and larry and moe
|
||||
# and larry have a symmetric connection (they're in
|
||||
# opposite directions of each other).
|
||||
# for larry, moe is to the left and curly is also above.
|
||||
# note that curly is above both moe and larry
|
||||
# and that the connection between moe and larry is symmetric
|
||||
# (i.e. they're in opposite directions of each other).
|
||||
larry:
|
||||
left = moe
|
||||
up = curly
|
||||
|
||||
# larry is below curly. if you move up from moe and then
|
||||
# down, you'll end up on larry.
|
||||
# for curly, larry is below.
|
||||
# if you move up from moe, and then move down,
|
||||
# you'll end up on larry, not back at moe.
|
||||
curly:
|
||||
down = larry
|
||||
end
|
||||
|
||||
@@ -118,7 +118,7 @@ private:
|
||||
void sendClipboardEvent(Event::Type type, ClipboardID id) const;
|
||||
|
||||
// message handlers
|
||||
bool onMouseMove(SInt32 mx, SInt32 my);
|
||||
bool onMouseMove(CGFloat mx, CGFloat my);
|
||||
// mouse button handler. pressed is true if this is a mousedown
|
||||
// event, false if it is a mouseup event. macButton is the index
|
||||
// of the button pressed using the mac button mapping.
|
||||
|
||||
@@ -1028,20 +1028,20 @@ OSXScreen::handleSystemEvent(const Event& event, void*)
|
||||
}
|
||||
|
||||
bool
|
||||
OSXScreen::onMouseMove(SInt32 mx, SInt32 my)
|
||||
OSXScreen::onMouseMove(CGFloat mx, CGFloat my)
|
||||
{
|
||||
LOG((CLOG_DEBUG2 "mouse move %+d,%+d", mx, my));
|
||||
LOG((CLOG_DEBUG2 "mouse move %+f,%+f", mx, my));
|
||||
|
||||
SInt32 x = mx - m_xCursor;
|
||||
SInt32 y = my - m_yCursor;
|
||||
CGFloat x = mx - m_xCursor;
|
||||
CGFloat y = my - m_yCursor;
|
||||
|
||||
if ((x == 0 && y == 0) || (mx == m_xCenter && mx == m_yCenter)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// save position to compute delta of next motion
|
||||
m_xCursor = mx;
|
||||
m_yCursor = my;
|
||||
m_xCursor = (SInt32)mx;
|
||||
m_yCursor = (SInt32)my;
|
||||
|
||||
if (m_isOnScreen) {
|
||||
// motion on primary screen
|
||||
@@ -1070,7 +1070,21 @@ OSXScreen::onMouseMove(SInt32 mx, SInt32 my)
|
||||
}
|
||||
else {
|
||||
// send motion
|
||||
sendEvent(m_events->forIPrimaryScreen().motionOnSecondary(), MotionInfo::alloc(x, y));
|
||||
// Accumulate together the move into the running total
|
||||
static CGFloat m_xFractionalMove = 0;
|
||||
static CGFloat m_yFractionalMove = 0;
|
||||
|
||||
m_xFractionalMove += x;
|
||||
m_yFractionalMove += y;
|
||||
|
||||
// Return the integer part
|
||||
SInt32 intX = (SInt32)m_xFractionalMove;
|
||||
SInt32 intY = (SInt32)m_yFractionalMove;
|
||||
|
||||
// And keep only the fractional part
|
||||
m_xFractionalMove -= intX;
|
||||
m_yFractionalMove -= intY;
|
||||
sendEvent(m_events->forIPrimaryScreen().motionOnSecondary(), MotionInfo::alloc(intX, intY));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -933,6 +933,10 @@ struct codepair {
|
||||
{ XK_oe, 0x0153 }, /* LATIN SMALL LIGATURE OE */
|
||||
{ XK_Ydiaeresis, 0x0178 }, /* LATIN CAPITAL LETTER Y WITH DIAERESIS */
|
||||
{ XK_EuroSign, 0x20ac }, /* EURO SIGN */
|
||||
{ 0x1000218, 0x0218}, /* LATIN CAPITAL LETTER S WITH COMMA BELOW */
|
||||
{ 0x1000219, 0x0219}, /* LATIN SMALL LETTER S WITH COMMA BELOW */
|
||||
{ 0x100021a, 0x021a}, /* LATIN CAPITAL LETTER T WITH COMMA BELOW */
|
||||
{ 0x100021b, 0x021b}, /* LATIN CAPITAL LETTER T WITH COMMA BELOW */
|
||||
|
||||
/* combining dead keys */
|
||||
{ XK_dead_abovedot, 0x0307 }, /* COMBINING DOT ABOVE */
|
||||
|
||||
Reference in New Issue
Block a user