Remove the RaiseWindow call from OnWindowRestored for now.
authorPierre-Loup A. Griffais <pgriffais@valvesoftware.com>
Wed, 26 Mar 2014 12:54:51 -0700
changeset 868379527cb2cf8a
parent 8682 a31313cfa891
child 8684 fd192408b830
Remove the RaiseWindow call from OnWindowRestored for now.

It seems like a net improvement in all the scenarios Sam and I could
think of, and looking at hg history it was added for fullscreen
window management specifically. Much of that code has changed since
then, but maybe it needs to stay there for that and simply be moved
to a fullscreen condition check.

It would solve this issue:

https://bugzilla.libsdl.org/show_bug.cgi?id=2439

As well as cases where on SteamOS, we hide/show specific Steam
overlay windows while expecting them to stay in the background, since
changing the window stacking order really angers the NVIDIA driver.

CR: Sam.
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Tue Mar 25 15:24:43 2014 -0700
     1.2 +++ b/src/video/SDL_video.c	Wed Mar 26 12:54:51 2014 -0700
     1.3 @@ -2129,7 +2129,13 @@
     1.4  void
     1.5  SDL_OnWindowRestored(SDL_Window * window)
     1.6  {
     1.7 -    SDL_RaiseWindow(window);
     1.8 +    /*
     1.9 +     * FIXME: Is this fine to just remove this, or should it be preserved just
    1.10 +     * for the fullscreen case? In principle it seems like just hiding/showing
    1.11 +     * windows shouldn't affect the stacking order; maybe the right fix is to
    1.12 +     * re-decouple OnWindowShown and OnWindowRestored.
    1.13 +     */
    1.14 +    //SDL_RaiseWindow(window);
    1.15  
    1.16      if (FULLSCREEN_VISIBLE(window)) {
    1.17          SDL_UpdateFullscreenMode(window, SDL_TRUE);