SDL: Don't hide popups when losing focus

From 0cb7c4ba58a7a90ab22b6ffed81a75c5a7193a6a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 16 Mar 2023 14:04:12 -0700
Subject: [PATCH] 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.
---
 src/video/x11/SDL_x11events.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c
index bf226b31de29..a956a828b4ea 100644
--- a/src/video/x11/SDL_x11events.c
+++ b/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)