Skip to content

Commit

Permalink
wayland: Use the proper popup coordinates if the position is set whil…
Browse files Browse the repository at this point in the history
…e the window is hidden
  • Loading branch information
Kontrabant committed Dec 27, 2024
1 parent 1701208 commit 567b828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/wayland/SDL_waylandwindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1852,8 +1852,8 @@ void Wayland_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window)
xdg_positioner_set_size(data->shell_surface.xdg.popup.xdg_positioner, data->current.logical_width, data->current.logical_height);

// Set the popup initial position
position_x = window->x;
position_y = window->y;
position_x = window->last_position_pending ? window->pending.x : window->x;
position_y = window->last_position_pending ? window->pending.y : window->y;
EnsurePopupPositionIsValid(window, &position_x, &position_y);
if (data->scale_to_display) {
position_x = PixelToPoint(window->parent, position_x);
Expand Down

0 comments on commit 567b828

Please sign in to comment.