Skip to content

X11 uses the Wayland message box code when no video system is initialized #5445

@icculus

Description

@icculus

So if you run SDL/test/testmessage.c, you'll notice on X11 you'll get message boxes like this...

2022-03-24_14-28

...until you get to the last one...

2022-03-24_14-29

...this is because, without the video subsystem initialized, we use SDL_MessageboxValidForDriver to decide what to do, but this returns SDL_TRUE immediately if the parent window is NULL.

Which means we try the Wayland code before the X11 code. And the Wayland code just spawns an instance of zenity to show a GTK+ message box.

Problem 1: we should probably choose the X11 driver here, but we definitely want Wayland if this would just end up talking to XWayland, so it's complicated.
Problem 2: SDL_MessageboxValidForDriver needs a better approach, perhaps.
Problem 3: the GTK+ dialog looks SO MUCH BETTER. I kinda feel like we should use this on X11 too, and fallback to our own code if zenity isn't available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions