Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDL2] wayland: Send exposure events when showing or resizing the window #10783

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/video/wayland/SDL_waylandwindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,9 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window)
* HideWindow was called immediately before ShowWindow.
*/
WAYLAND_wl_display_roundtrip(c->display);

/* Send an exposure event to signal that the client should draw. */
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_EXPOSED, 0, 0);
}

static void Wayland_ReleasePopup(_THIS, SDL_Window *popup)
Expand Down Expand Up @@ -2094,6 +2097,7 @@ static void Wayland_HandleResize(SDL_Window *window, int width, int height, floa
window->w = 0;
window->h = 0;
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, width, height);
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_EXPOSED, 0, 0);
window->w = width;
window->h = height;
data->needs_resize_event = SDL_FALSE;
Expand Down
Loading