Synergy-core: Mac OSX: Dragging object in Unity 3D does not work due to lack of mouse deltas

Created on 13 Oct 2014  路  5Comments  路  Source: symless/synergy-core

Imported issue:

  • Author: James McMullan
  • Date: 2014-05-23 18:22:40
  • Legacy ID: 4062

Steps to reproduce:

  1. Open Unity 3D
  2. Open an existing scene or create a new one
  3. Attempt to move a Game Object within the scene by selecting its 3D cursor and dragging it

Expected: Dragging an object in Unity 3D should move the object.

Actual: Dragging an object does nothing/

Versions and operating systems:

Any version of Synergy running on any version of Mac OSX

Solution

The issue is caused because the CPlatformSceen implementation on Mac OSX does not correctly emulate mouse dragging events. Mouse dragging events on Mac OSX require not only the new position to be set in the event but also the mouse movement delta. Adding the following code to the postMouseEvent function in COSXScreen fixes the issue:

SInt64 deltaX = pos.x;
deltaX -= m_xCursor;

SInt64 deltaY = pos.y;
deltaY -= m_yCursor;

CGEventSetIntegerValueField(event, kCGMouseEventDeltaX, deltaX);
CGEventSetIntegerValueField(event, kCGMouseEventDeltaY, deltaY);

double deltaFX = deltaX;
double deltaFY = deltaY;

CGEventSetDoubleValueField(event, kCGMouseEventDeltaX, deltaFX);
CGEventSetDoubleValueField(event, kCGMouseEventDeltaY, deltaFY);

Temporary workarounds:

No work around

Similar bugs:

Additional comments:

bug stale

Most helpful comment

I would really love this to be fixed. Having a second mouse just for Unity development is annoying.

All 5 comments

  • Author: Simon Legrand
  • Date: 2014-08-13 21:18:44

This affects me too. Kubuntu 14.04 server OS X 10.9 client. Unity 3D and most other 3D apps cannot navigate by holding modifier key and using mouse.

Reverted

Hmm... Is the fix going to land to the mainstream? Because I see it has been reverted. I just added the lines from the solution to the source code, compiled for El capitan and now unity works just fine without any downsides I could think of.

I would really love this to be fixed. Having a second mouse just for Unity development is annoying.

Maybe problem is in capture mouse/keyboard hold button states.
I have this issue in Unity, UnrealEngine, Blender.
I can grab short video on both machines with full description for more explanation of that problem, if you want.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

130s picture 130s  路  3Comments

spacepluk picture spacepluk  路  5Comments

laur89 picture laur89  路  5Comments

LeTink picture LeTink  路  4Comments

martindale picture martindale  路  5Comments