Quellcode durchsuchen

Don't hide popups when losing focus

This isn't the behavior on Windows, and this should probably be an application defined behavior.

If we decide we want this globally, it should probably be implemented at a higher level in SDL_OnWindowFocusLost(), and properly handle the transition of focus to a child window.
Sam Lantinga vor 2 Jahren
Ursprung
Commit
0cb7c4ba58
1 geänderte Dateien mit 0 neuen und 17 gelöschten Zeilen
  1. 0 17
      src/video/x11/SDL_x11events.c

+ 0 - 17
src/video/x11/SDL_x11events.c

@@ -461,20 +461,6 @@ static void X11_ShowChildren(_THIS, SDL_Window *window)
     }
 }
 
-static void X11_HideChildren(_THIS, SDL_Window *window)
-{
-    for (window = window->first_child; window != NULL; window = window->next_sibling) {
-        if (!(window->flags & SDL_WINDOW_HIDDEN)) {
-            window->driverdata->hidden_by_parent_focus = SDL_TRUE;
-            X11_HideWindow(_this, window);
-        }
-
-        if (window->first_child) {
-            X11_HideChildren(_this, window);
-        }
-    }
-}
-
 static void X11_DispatchFocusIn(_THIS, SDL_WindowData *data)
 {
 #ifdef DEBUG_XEVENTS
@@ -518,9 +504,6 @@ static void X11_DispatchFocusOut(_THIS, SDL_WindowData *data)
 #ifdef SDL_USE_IME
     SDL_IME_SetFocus(SDL_FALSE);
 #endif
-    if (data->window->parent == NULL) {
-        X11_HideChildren(_this, data->window);
-    }
 }
 
 static void X11_DispatchMapNotify(SDL_WindowData *data)