Explorar o código

wayland: Adjust overlap required for popups to be considered adjacent

Popups beyond the right and bottom borders of the window must be width/height minus one in order to be considered adjacent and not be instantly closed or cause a protocol error.
Frank Praznik %!s(int64=2) %!d(string=hai) anos
pai
achega
17fba24e21
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/video/wayland/SDL_waylandwindow.c

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

@@ -317,10 +317,10 @@ static void EnsurePopupPositionIsValid(SDL_Window *window)
         window->y = -window->h;
     }
     if (window->x > window->parent->w) {
-        window->x = window->parent->w;
+        window->x = window->parent->w - 1;
     }
     if (window->y > window->parent->h) {
-        window->y = window->parent->h;
+        window->y = window->parent->h - 1;
     }
 }