You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user drags the parent window, it may extend beyond the current display boundaries. However, setting the child window’s position at this moment triggers display boundary checks, causing the child window to be positioned above the parent, which disrupts the intended behavior.
static void WIN_ConstrainPopup(SDL_Window *window, bool output_to_pending)
{
// Clamp popup windows to the output borders
if (SDL_WINDOW_IS_POPUP(window)) {
SDL_Window *w;
SDL_DisplayID displayID;
SDL_Rect rect;
int abs_x = window->last_position_pending ? window->pending.x : window->floating.x;
int abs_y = window->last_position_pending ? window->pending.y : window->floating.y;
const int width = window->last_size_pending ? window->pending.w : window->floating.w;
const int height = window->last_size_pending ? window->pending.h : window->floating.h;
int offset_x = 0, offset_y = 0;
When the user drags the parent window, it may extend beyond the current display boundaries. However, setting the child window’s position at this moment triggers display boundary checks, causing the child window to be positioned above the parent, which disrupts the intended behavior.
static void WIN_ConstrainPopup(SDL_Window *window, bool output_to_pending)
{
// Clamp popup windows to the output borders
if (SDL_WINDOW_IS_POPUP(window)) {
SDL_Window *w;
SDL_DisplayID displayID;
SDL_Rect rect;
int abs_x = window->last_position_pending ? window->pending.x : window->floating.x;
int abs_y = window->last_position_pending ? window->pending.y : window->floating.y;
const int width = window->last_size_pending ? window->pending.w : window->floating.w;
const int height = window->last_size_pending ? window->pending.h : window->floating.h;
int offset_x = 0, offset_y = 0;
}
So, is there a missing condition here?
The text was updated successfully, but these errors were encountered: