SDL_ShowSimpleMessageBox showing up behind borderless fullscreen windows

(windows 10, sdl 2.0.12)

This is kind of a breaking issue because there’s no way to get the message box in front so you can click okay, have to kill via the task manager

Seems to work fine in windowed mode and exclusive fullscreen mode… its just in borderless mode that its broken

any thoughts/workarounds?

1 Like

Are you passing the pointer to your window in the function call? If not then try passing the window pointer, otherwise if you are passing the window pointer try passing NULL instead.

SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Whoops!", "Uh oh!", myWindow);
// OR
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Whoops!", "Uh oh!", NULL);

it does not matter either way

Definitely sounds like an SDL bug. As a workaround, maybe close the window before calling SDL_ShowSimpleMessageBox()?

I can’t reproduce this here (not sure it makes a difference, but I’m on Windows 7)…can you show me how you’re creating the window?

Also: do you have the input grabbed with SDL_SetRelativeMouseMode or SDL_SetWindowGrab?


no mouse input grabbed, dual 4k monitor setup with 150% ui scale set on each one, left monitor is the main one

window created as