Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Windows popping up ...

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Poland
    Posts
    232

    Windows popping up ...

    Hello!

    I am not sure where should I post this question (anyway, other forums give me errors when I try to open them). Let's get straight to the problem...

    Have you ever noticed that when your GL application is running and you press ALT + TAB (a dialog pops up) the performance decreases by 70%? Well, that's not really a problem but when the dialog with which you choose a current window disappears the performance is still about only 60% of the previous one. When the window appears some windows settings probably are being made and even when it hides the application runs much worse.

    Do you have any idea how to cope with it (at least, how to disable ALT+TAB)?

    Thanks in advance!

  2. #2
    Advanced Member Frequent Contributor plasmonster's Avatar
    Join Date
    Mar 2004
    Posts
    750

    Re: Windows popping up ...

    Orzech,

    in windows, it is generally considered bad form to prevent the user from task switching, so I guess the short answer is: don't do it. Anyway, it is better to be prepared for such a switch, and be able to handle it gracefully.

    As for the performance hit, this is probably due to windows demoting your thread's priority to accomodate the new foreground process, as it should be.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Poland
    Posts
    232

    Re: Windows popping up ...

    Thanks for your reply, Portal.

    Originally posted by Portal:
    As for the performance hit, this is probably due to windows demoting your thread's priority to accomodate the new foreground process, as it should be.
    The problem is that the application doesn't get to a previous state - I mean that it begins to run more slowly even after the 'switchning-window' gones. I know it seems odd. Do you now what can I do to bring my app to its full strength?

    Thanks

  4. #4
    Advanced Member Frequent Contributor plasmonster's Avatar
    Join Date
    Mar 2004
    Posts
    750

    Re: Windows popping up ...

    Hmmm, that is odd. You might try creating your window wih the WS_EX_TOPMOST style. You can also toggle this with the SetWindowPos(...) function using HWND_TOPMOST for the hWndInsertAfter parameter.

    You could also utilize the GetThreadPriority(...) function to examine any changes that windows maybe making, then use the SetThreadPriority(...) function to make changes yourself.

    All of these functions are fully documented in the MSDN.

    Curious, what flavor of windows are you using?

  5. #5
    Junior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Poland
    Posts
    232

    Re: Windows popping up ...

    Thanks, portal.

    Originally posted by Portal:
    Curious, what flavor of windows are you using?
    Win 2000 Pro (if that's what you asked).

    I'll check out what you've said.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •