src/video/x11/SDL_x11messagebox.c
changeset 9423 3df83030dab9
parent 9339 45c49e8c9416
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9422:286c854c1d5b 9423:3df83030dab9
    29 #include "SDL_assert.h"
    29 #include "SDL_assert.h"
    30 
    30 
    31 #include <locale.h>
    31 #include <locale.h>
    32 
    32 
    33 
    33 
    34 #define SDL_FORK_MESSAGEBOX 0
    34 #define SDL_FORK_MESSAGEBOX 1
    35 #define SDL_SET_LOCALE      0
    35 #define SDL_SET_LOCALE      1
    36 
    36 
    37 #if SDL_FORK_MESSAGEBOX
    37 #if SDL_FORK_MESSAGEBOX
    38 #include <sys/types.h>
    38 #include <sys/types.h>
    39 #include <sys/wait.h>
    39 #include <sys/wait.h>
    40 #include <unistd.h>
    40 #include <unistd.h>
   715 #if SDL_FORK_MESSAGEBOX
   715 #if SDL_FORK_MESSAGEBOX
   716     /* Use a child process to protect against setlocale(). Annoying. */
   716     /* Use a child process to protect against setlocale(). Annoying. */
   717     pid_t pid;
   717     pid_t pid;
   718     int fds[2];
   718     int fds[2];
   719     int status = 0;
   719     int status = 0;
   720 
       
   721     /* Need to flush here in case someone has turned grab off and it hasn't gone through yet, etc. */
       
   722     X11_XFlush(data->display);
       
   723 
   720 
   724     if (pipe(fds) == -1) {
   721     if (pipe(fds) == -1) {
   725         return X11_ShowMessageBoxImpl(messageboxdata, buttonid); /* oh well. */
   722         return X11_ShowMessageBoxImpl(messageboxdata, buttonid); /* oh well. */
   726     }
   723     }
   727 
   724