-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Milestone
Description
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);
}
}