X11TK: Implement SDL_HINT_VIDEO_X11_PREFER_TOOLKIT

This commit is contained in:
eafton 2025-09-23 14:13:13 +03:00 committed by GitHub
parent a83a12523d
commit cf8ff67718
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -235,10 +235,12 @@ static bool X11_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int
// Display an x11 message box.
bool X11_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonID)
{
if (SDL_Zenity_ShowMessageBox(messageboxdata, buttonID)) {
return true;
if (!SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_PREFER_TOOLKIT, false)) {
if (SDL_Zenity_ShowMessageBox(messageboxdata, buttonID)) {
return true;
}
}
#if SDL_FORK_MESSAGEBOX
// Use a child process to protect against setlocale(). Annoying.
pid_t pid;