Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Set mouse position osx

$
0
0

@Regi wrote:

Hi guys,

On OSX I'm using

CGPoint point;
point.x = 10;
point.y = 10;
CGWarpMouseCursorPosition(point);

To warp mouse to a desired screen position. The warping works, but if I call
cout << ofGetMouseX() << " " << ofGetMouseY() << "\n";
right after the warp, I get 2 options:
1) If I haven't moved the mouse since the start of the application I get back (0 0).
2) If I've moved the mouse I get the coordinates of the last mouse position, not 10 10.

Any suggestions would be really appreciated, since I need to read the mouse coordinates right after the jump and getting the pre-jump one's doesn't cut it.

Thanks!

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Latest Images

Trending Articles



Latest Images