Disable X11 on Wayland unless explicitly activated.

This commit is contained in:
2025-09-21 15:18:02 +02:00
parent 917309e99c
commit 180f2b70fa
2 changed files with 23 additions and 3 deletions

View File

@@ -426,9 +426,9 @@ void Application::cleanup()
bool Application::initSDL()
{
#if MIJIN_TARGET_OS == MIJIN_OS_LINUX
// prefer x11 over wayland, as ImGui viewports don't work with wayland
// TODO: this still doesn't work all the time, maybe there will be an update to ImGui in the future?
SDL_SetHint(SDL_HINT_VIDEO_DRIVER, "x11,wayland");
if (mConfig.flags.x11OnWayland) {
SDL_SetHint(SDL_HINT_VIDEO_DRIVER, "x11,wayland");
}
#endif
if (!SDL_Init(SDL_INIT_VIDEO))
{