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?

–ryan.

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
window = SDL_CreateWindow(“game”, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 3840, 2160, SDL_WINDOW_BORDERLESS | SDL_WINDOW_OPENGL | SDL_WINDOW_ALLOW_HIGHDPI);