From b5c05b6e29c3307c44fa40ae068e19f8322d6854 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Mon, 4 Nov 2024 18:14:01 +0100 Subject: [PATCH] wayland: pass actual empty strings to zenity The double quotes were passed literally to the zenity arguments which resulted in the message box displaying literal `""` when no text was given. The empty string is more logical in this case, e.g., the empty title results in the message box having lesser height. --- src/video/wayland/SDL_waylandmessagebox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/wayland/SDL_waylandmessagebox.c b/src/video/wayland/SDL_waylandmessagebox.c index 88a860b03f..ca8552317d 100644 --- a/src/video/wayland/SDL_waylandmessagebox.c +++ b/src/video/wayland/SDL_waylandmessagebox.c @@ -123,14 +123,14 @@ bool Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *butto argv[argc++] = "--title"; argv[argc++] = messageboxdata->title; } else { - argv[argc++] = "--title=\"\""; + argv[argc++] = "--title="; } if (messageboxdata->message && messageboxdata->message[0]) { argv[argc++] = "--text"; argv[argc++] = messageboxdata->message; } else { - argv[argc++] = "--text=\"\""; + argv[argc++] = "--text="; } for (i = 0; i < messageboxdata->numbuttons; ++i) { @@ -143,7 +143,7 @@ bool Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *butto argv[argc++] = "--extra-button"; argv[argc++] = messageboxdata->buttons[i].text; } else { - argv[argc++] = "--extra-button=\"\""; + argv[argc++] = "--extra-button="; } } if (messageboxdata->numbuttons == 0) {