Closed
Description
If an SDL3 window is running inside of XWayland, resizing in the way shown in the video below results in a crash.
crash.mp4
Example code:
#define SDL_MAIN_USE_CALLBACKS
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
typedef struct {
SDL_Window *window;
SDL_Renderer *renderer;
} State;
SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[]) {
State *state = SDL_malloc(sizeof(State));
*appstate = state;
if (!SDL_Init(SDL_INIT_VIDEO))
return SDL_APP_FAILURE;
if (!SDL_CreateWindowAndRenderer(
"Example", 800,
600, SDL_WINDOW_RESIZABLE, &state->window,
&state->renderer))
return SDL_APP_FAILURE;
return SDL_APP_CONTINUE;
}
SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event) {
return SDL_APP_CONTINUE;
}
SDL_AppResult SDL_AppIterate(void *appstate) {
State *state = (State *)appstate;
SDL_RenderClear(state->renderer);
SDL_RenderPresent(state->renderer);
SDL_Delay(1000 * 1 / 60);
return SDL_APP_CONTINUE;
}
void SDL_AppQuit(void *appstate, SDL_AppResult result) {
}
Metadata
Metadata
Assignees
Labels
No labels