Fullscreen and mouse issues

Hello,

In this simple program a circle is drawn under the mouse pointer, and the pointer itself hides when it hovers the rectangle:

#include "ofMain.h"
class ofApp : public ofBaseApp
{
public:
    void draw(){
        ofNoFill() ;
        ofDrawRectangle( rect ) ;
        ofDrawCircle( ofGetMouseX(), ofGetMouseY(), 8.f ) ;
        ofDrawBitmapString( "Press any key to toggle fullscreen", 10.f, 20.f ) ;
    }
    void mouseMoved( int x, int y ){
        if( rect.inside( x, y ) ) ofHideCursor() ;
        else ofShowCursor() ;
    }
    void keyReleased( int key ){
        ofToggleFullscreen() ;
    }
    ofRectangle rect{ 10.f, 30.f, 200.f, 200.f };
} ;

Eveything works fine in windowed mode, but there are issues in fullscreen. For exemple:

  • when entering the rectangle, the mouse cursor sometimes jump to the center of the screen
  • the mouse cursor sometimes start to blink at stationary position, within the rectangle and near to the edge
  • in the same position, the mouse cursor also blink, and the circle is drawn at the center of the screen

Any idea what happens here ?

src.zip (671 Octets)

OF 0.11.0 mingw32 / qt creator / windows 7