Commit 07ba13b7a9eb6bd53dae6849ce6ca4977304dd65

Ethan Lee 2021-03-26T00:40:05

wayland: Pass --no-wrap to Zenity. There seems to be a bug where it can wrap the text based on the minimum possible window size, which can be worked around with --no-wrap. This technically uncaps the width entirely, but this isn't wildly different from what other backends do.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/wayland/SDL_waylandmessagebox.c b/src/video/wayland/SDL_waylandmessagebox.c
index e1a71c6..50869a5 100644
--- a/src/video/wayland/SDL_waylandmessagebox.c
+++ b/src/video/wayland/SDL_waylandmessagebox.c
@@ -32,7 +32,7 @@ Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
     #define ZENITY_CONST(name, str) \
         const char *name = str; \
         const size_t name##_len = SDL_strlen(name);
-    ZENITY_CONST(zenity, "zenity --question --switch --icon-name=dialog-")
+    ZENITY_CONST(zenity, "zenity --question --switch --no-wrap --icon-name=dialog-")
     ZENITY_CONST(title, "--title=")
     ZENITY_CONST(message, "--text=")
     ZENITY_CONST(extrabutton, "--extra-button=")