Skip to content

Windows: SDL_ShowSimpleMessageBox unactionable with SDL_WINDOW_FULLSCREEN_DESKTOP #5371

@AntTheAlchemist

Description

@AntTheAlchemist

I'm pretty sure this is a new bug because I didn't notice it happening until recently. Can't click a button to close the message box if a full screen window is created. It does work on a normal window or even a window without (_DESKTOP). It doesn't matter if the message box takes the window in question, or a null. The message box can be moved and the "OK" button even response to mouse hovering over it. The following simple example code triggers it:

#include <SDL.h>
int main(int argc, char** argv) {
	SDL_Init(SDL_INIT_VIDEO);
	SDL_Window * w = SDL_CreateWindow("test1", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_FULLSCREEN_DESKTOP);
	SDL_Renderer * r = SDL_CreateRenderer(w, -1, SDL_RENDERER_PRESENTVSYNC);
	for (;;) {
		SDL_PumpEvents();
		SDL_Event event;
		while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1) {
			switch (event.type) {
			case SDL_KEYDOWN:
				SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "test2", "test3", w);
				break;
			case SDL_QUIT:
				SDL_Quit();
				return 0;
			}
		}
		SDL_SetRenderDrawColor(r, 0, 0, 0, 0xFF);
		SDL_RenderClear(r);
		SDL_RenderPresent(r);
	}
}

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