瀏覽代碼

wayland: Always trigger a resize when handling a configure event.

When we removed the OpenGL resize workaround it introduced a problem for
fullscreen windows in particular: When leaving fullscreen we tried to send a
resize event, but UpdateFullscreenMode would send a SIZE_CHANGED immediately
after, deleting our resize event and causing the following configure event's
resize to be ignored. This timing issue resulted in fullscreen windows not
being resized at all when becoming a floating window.

By always forcing resize events from configure events, we ensure that RESIZED
always makes it through. SetWindowSize-type changes should be unaffected as
they do not fire configure events.
Ethan Lee 4 年之前
父節點
當前提交
71897cc1c9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video/wayland/SDL_waylandwindow.c

+ 1 - 1
src/video/wayland/SDL_waylandwindow.c

@@ -1219,7 +1219,7 @@ Wayland_HandlePendingResize(SDL_Window *window)
 
     if (data->resize.pending) {
         struct wl_region *region;
-        if (data->scale_factor != data->resize.scale_factor) {
+        if (data->scale_factor != data->resize.scale_factor || data->resize.configure) {
             window->w = 0;
             window->h = 0;
         }