SYNERGY-1047 Scroll doesn't work in case of macOS is server

This commit is contained in:
Serhii Hadzhilov 2021-07-05 12:07:18 +03:00
parent fdb947e0af
commit d3dea8e762
2 changed files with 2 additions and 12 deletions

View file

@ -153,9 +153,6 @@ private:
// get the current scroll wheel speed // get the current scroll wheel speed
double getScrollSpeed() const; double getScrollSpeed() const;
// get the current scroll wheel speed
double getScrollSpeedFactor() const;
// enable/disable drag handling for buttons 3 and up // enable/disable drag handling for buttons 3 and up
void enableDragTimer(bool enable); void enableDragTimer(bool enable);

View file

@ -1460,9 +1460,8 @@ OSXScreen::mapMacButtonToSynergy(UInt16 macButton) const
SInt32 SInt32
OSXScreen::mapScrollWheelToSynergy(SInt32 x) const OSXScreen::mapScrollWheelToSynergy(SInt32 x) const
{ {
// return accelerated scrolling but not exponentially scaled as it is // return accelerated scrolling
// on the mac. double d = (1.0 + getScrollSpeed()) * x;
double d = (1.0 + getScrollSpeed()) * x / getScrollSpeedFactor();
return static_cast<SInt32>(m_scrollDirection * 120.0 * d); return static_cast<SInt32>(m_scrollDirection * 120.0 * d);
} }
@ -1500,12 +1499,6 @@ OSXScreen::getScrollSpeed() const
return scaling; return scaling;
} }
double
OSXScreen::getScrollSpeedFactor() const
{
return pow(10.0, getScrollSpeed());
}
void void
OSXScreen::enableDragTimer(bool enable) OSXScreen::enableDragTimer(bool enable)
{ {