فهرست منبع

wayland: handle 0 extra buttons in message box

When no extra buttons are passed to zenity with `--question --switch`
arguments it fails to show anything, however, SDL3 still reports
success. To handle this case, we pass an additional "OK" button.
Marcin Serwin 10 ماه پیش
والد
کامیت
1e7c7c69c5
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      src/video/wayland/SDL_waylandmessagebox.c

+ 3 - 0
src/video/wayland/SDL_waylandmessagebox.c

@@ -146,6 +146,9 @@ bool Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *butto
             argv[argc++] = "--extra-button=\"\"";
         }
     }
+    if (messageboxdata->numbuttons == 0) {
+        argv[argc++] = "--extra-button=OK";
+    }
     argv[argc] = NULL;
 
     SDL_PropertiesID props = SDL_CreateProperties();