소스 검색

wayland: Don't ignore configs for non-fullscreen, non-resizable windows.

This was causing configure events to not inform SDL of window size
changes, even when they were based on resizes that we fully expected. The
result was fullscreen->windowed not working at all, because it would
retain the desktop resolution instead of reverting to the floating size
that it had before moving to fullscreen mode.

Fixes Super Hexagon fullscreen toggling.
Ethan Lee 4 년 전
부모
커밋
584673a5a1
1개의 변경된 파일5개의 추가작업 그리고 9개의 파일을 삭제
  1. 5 9
      src/video/wayland/SDL_waylandwindow.c

+ 5 - 9
src/video/wayland/SDL_waylandwindow.c

@@ -236,17 +236,13 @@ handle_configure_xdg_toplevel(void *data,
                 height = SDL_min(height, window->max_h);
             }
             height = SDL_max(height, window->min_h);
-        } else {
-            return;
         }
-    }
 
-    /* Always send a maximized/restore event; if the event is redundant it will
-     * automatically be discarded (see src/events/SDL_windowevents.c)
-     *
-     * No, we do not get minimize events from xdg-shell.
-     */
-    if (!fullscreen) {
+        /* Always send a maximized/restore event; if the event is redundant it will
+         * automatically be discarded (see src/events/SDL_windowevents.c)
+         *
+         * No, we do not get minimize events from xdg-shell.
+         */
         SDL_SendWindowEvent(window,
                             maximized ?
                                 SDL_WINDOWEVENT_MAXIMIZED :