mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
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.
This commit is contained in:
@@ -317,10 +317,10 @@ static void EnsurePopupPositionIsValid(SDL_Window *window)
|
|||||||
window->y = -window->h;
|
window->y = -window->h;
|
||||||
}
|
}
|
||||||
if (window->x > window->parent->w) {
|
if (window->x > window->parent->w) {
|
||||||
window->x = window->parent->w;
|
window->x = window->parent->w - 1;
|
||||||
}
|
}
|
||||||
if (window->y > window->parent->h) {
|
if (window->y > window->parent->h) {
|
||||||
window->y = window->parent->h;
|
window->y = window->parent->h - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user