Digitopia/Gamult

Mouse cursor not showing in OSX 10.10

Closed this issue · 1 comments

Just tried the hot fix and it works.

Just this is not a problem coming from our code, we should leave this issue in standby.

FYI the fix was:

1 - Go to [oF root]/libs/openFrameworks/app/ofAppGLFWWindow.cpp

2 - Inside motion_cb() method include the following code:

#ifdef TARGET_OSX
       [(NSWindow*)ofGetCocoaWindow() resetCursorRects];
#endif

3 - inside mouse_cb() replace the existing code in

if (state == GLFW_PRESS){

with this one:

#ifdef TARGET_OSX        
        NSPoint position = [(NSWindow*)ofGetCocoaWindow() mouseLocationOutsideOfEventStream];
        int posY= abs(position.y-ofGetHeight());
        if(position.y>ofGetHeight())posY= (position.y-ofGetHeight())*-1;

        ofNotifyMousePressed((int)position.x, posY, button);

#else        
        ofNotifyMousePressed(ofGetMouseX(), ofGetMouseY(), button);
#endif