Browse Source

We don't need to track whether we were hidden by parent focus change

Sam Lantinga 2 years ago
parent
commit
c7ab378c61
3 changed files with 2 additions and 9 deletions
  1. 2 4
      src/video/x11/SDL_x11events.c
  2. 0 4
      src/video/x11/SDL_x11window.c
  3. 0 1
      src/video/x11/SDL_x11window.h

+ 2 - 4
src/video/x11/SDL_x11events.c

@@ -501,10 +501,8 @@ static void X11_DispatchMapNotify(SDL_WindowData *data)
 
 static void X11_DispatchUnmapNotify(SDL_WindowData *data)
 {
-    if (!data->hidden_by_parent_focus) {
-        SDL_SendWindowEvent(data->window, SDL_EVENT_WINDOW_HIDDEN, 0, 0);
-        SDL_SendWindowEvent(data->window, SDL_EVENT_WINDOW_MINIMIZED, 0, 0);
-    }
+    SDL_SendWindowEvent(data->window, SDL_EVENT_WINDOW_HIDDEN, 0, 0);
+    SDL_SendWindowEvent(data->window, SDL_EVENT_WINDOW_MINIMIZED, 0, 0);
 }
 
 static void InitiateWindowMove(_THIS, const SDL_WindowData *data, const SDL_Point *point)

+ 0 - 4
src/video/x11/SDL_x11window.c

@@ -1263,10 +1263,6 @@ void X11_ShowWindow(_THIS, SDL_Window *window)
     Display *display = data->videodata->display;
     XEvent event;
 
-    if (window->driverdata->hidden_by_parent_focus) {
-        return;
-    }
-
     if (window->parent) {
         /* Update our position in case our parent moved while we were hidden */
         X11_UpdateWindowPosition(window);

+ 0 - 1
src/video/x11/SDL_x11window.h

@@ -60,7 +60,6 @@ struct SDL_WindowData
     int border_top;
     int border_bottom;
     SDL_bool mouse_grabbed;
-    SDL_bool hidden_by_parent_focus;
     Uint64 last_focus_event_time;
     PendingFocusEnum pending_focus;
     Uint64 pending_focus_time;