Skip to content

Mac OS window persists and hangs after destroy window and quit #10081

Description

@rongcuid

On development SDL3 branch:

#include <unistd.h>
#include <SDL3/SDL.h>

int main() {
	SDL_Init(SDL_INIT_VIDEO);
	SDL_Window * window = SDL_CreateWindow("Test", 800, 600, 0);
	SDL_ShowWindow(window);
	SDL_Event ev;
	while (1) {
		if (SDL_PollEvent(&ev)) {
			if (ev.type == SDL_EVENT_QUIT)
				break;
		}
	}
	SDL_DestroyWindow(window);
	SDL_Quit();
	sleep(10);
	return 0;
}

Reproduce:

  • Launch program
  • Close window

Expected:

  • Window closes immediately

Actual:

  • Window freezes until the end of program

This is a problem for my project where windows need to be opened/closed repeatedly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions