浏览代码

Revert "Make sure new windows have mouse and keyboard focus if there's no windowing system"

This reverts commit 5948ea997ff32c800e66c0ba722d8e2712404e68.

This isn't needed, the proper focus logic is in SDL_ShowWindow()
Sam Lantinga 1 年之前
父节点
当前提交
590d0bec6f
共有 1 个文件被更改,包括 3 次插入9 次删除
  1. 3 9
      src/video/SDL_video.c

+ 3 - 9
src/video/SDL_video.c

@@ -2131,15 +2131,9 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
         parent->first_child = window;
     }
 
-    if (_this->CreateSDLWindow) {
-        if (_this->CreateSDLWindow(_this, window, props) < 0) {
-            SDL_DestroyWindow(window);
-            return NULL;
-        }
-    } else {
-        /* No windowing system, make sure the new window has focus */
-        SDL_SetMouseFocus(window);
-        SDL_SetKeyboardFocus(window);
+    if (_this->CreateSDLWindow && _this->CreateSDLWindow(_this, window, props) < 0) {
+        SDL_DestroyWindow(window);
+        return NULL;
     }
 
     /* Clear minimized if not on windows, only windows handles it at create rather than FinishWindowCreation,