Hello Clemens!

    Thank you for your help!

    I tried your suggestion, it didn't change anything. :-(

    But then, by chance I re-evaluated the OpenGL initialization order and I discovered what was causing the problem:

    If I perform the initialization in THIS order, the problem is solved!
    glutInit( &argc, argv );
    glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB );
    glutInitWindowSize( 800, 600 );
    glutCreateWindow( "test" );
    glDisable( GL_DEPTH_TEST );
    glViewport( 0, 0, 800, 600 );
    glMatrixMode( GL_PROJECTION );
    glLoadIdentity();
    [...]


    If I perform the initialization in this order, the problem manifests:
    glutInit( &argc, argv );
    glutInitWindowSize( 800, 600 );
    glutCreateWindow( "test" );
    glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB );
    glDisable( GL_DEPTH_TEST );
    glViewport( 0, 0, 800, 600 );
    glMatrixMode( GL_PROJECTION );
    glLoadIdentity();
    [...]

    The only difference is the order of calling glutInitDisplayMode !

    I'm certain that there is a good reason for this and my being relatively new to OpenGL is why I got tripped-up by it.

    Thank you very much for taking the time to help me!

J


On Sun, 2013-06-30 at 10:35 +0200, Clemens Schäfermeier wrote:
Hi Jean,
do you use any of these functions:
glutVisibilityFunc( void (* callback)( int ) );
glutWindowStatusFunc( void (* callback)( int ) );
Otherwise I can't exactly understand your problem. I am too writing 
'non-fullscreen' programs and never experienced something like you did.
Clemens

Am 29.06.2013 23:07, schrieb Jean-Claude Gervais:
> Hello again,
>
>      I asked this question some months ago and never got an answer,
> thought I'd give it another try.
>
>      Basically what happens is this:
>
>      My non-fullscreen application doesn't seem to detect that it needs
> to repaint after another application's window transits over it.
>
>      For example: The application paints it's window and then waits for
> events by calling select with the socket acquired by doing this:
>
>      Display * dpy = glXGetCurrentDisplay();
>      SOCKET s = ConnectionNumber( dpy );
>
>      And select DOES wakeup when an input event happens in the window.
>
>      But if either the system screensaver comes on and then I move the
> mouse to dismiss it, or I drag a different application's window over the
> GL app, the select does NOT wake up.
>
>      Is there an initialization option to make sure this would happen?
>
>      I could use a timer and redraw the entire application window
> periodically but this would be wasteful.
>
>      Is there a way to detect the damage?
>
> Thanks
> J
>
>
> On Tue, 2013-01-29 at 11:18 -0500, Jean-Claude Gervais wrote:
>> Hi,
>>
>> Sorry for the newbie question, but scouring Google for info about
>> freeglut and screensavers yields too many results that have nothing to
>> do with my question, so I thought I'd ask the horse's mouth directly,
>> so to speak.
>>
>> My freeglut app works well, but I've noticed that some types of events
>> don't appear to be detected.
>>
>> The app sits idle in a select call most of the time, until an event
>> causes the select to return, triggering a repaint, which updates the
>> display and then the app goes back into select, etc...
>>
>> The problem appears when the system goes into screen-saver mode: The
>> system screensaver comes on, blanking the screen. Once the mouse is
>> moved or the keyboard is hit, the underlying freeglut app does not
>> repaint, its window remains blacked-out.
>>
>> I was wondering if there is a combination of flags I should be using
>> to catch this case or to cause an event to be generated?
>>
>> I hope my question is clear enough.
>>
>> Thank you for your time
>> J
>> ------------------------------------------------------------------------------
>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>> MVPs and experts. ON SALE this month only -- learn more at:
>> http://p.sf.net/sfu/learnnow-d2d
>> _______________________________________________
>> Freeglut-developer mailing list
>> Freeglut-developer@lists.sourceforge.net  <mailto:Freeglut-developer@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/freeglut-developer
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
>
>
>
> _______________________________________________
> Freeglut-developer mailing list
> Freeglut-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freeglut-developer
>


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freeglut-developer