浏览代码

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.
Pierre-Loup A. Griffais 11 年之前
父节点
当前提交
833cfe534a
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/video/SDL_video.c

+ 7 - 1
src/video/SDL_video.c

@@ -2129,7 +2129,13 @@ SDL_OnWindowMinimized(SDL_Window * window)
 void
 void
 SDL_OnWindowRestored(SDL_Window * window)
 SDL_OnWindowRestored(SDL_Window * window)
 {
 {
-    SDL_RaiseWindow(window);
+    /*
+     * FIXME: Is this fine to just remove this, or should it be preserved just
+     * for the fullscreen case? In principle it seems like just hiding/showing
+     * windows shouldn't affect the stacking order; maybe the right fix is to
+     * re-decouple OnWindowShown and OnWindowRestored.
+     */
+    //SDL_RaiseWindow(window);
 
 
     if (FULLSCREEN_VISIBLE(window)) {
     if (FULLSCREEN_VISIBLE(window)) {
         SDL_UpdateFullscreenMode(window, SDL_TRUE);
         SDL_UpdateFullscreenMode(window, SDL_TRUE);