SDL: wayland: Use substring matching for detecting the desktop name

From f48181fd33743da429877c4dbc8d7e22d67cefe7 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Sat, 3 Oct 2026 12:50:11 -0400
Subject: [PATCH] wayland: Use substring matching for detecting the desktop
 name

XDG_CURRENT_DESKTOP can be in the form of a colon separated list (e.g. ubuntu:KDE), so use substring matching instead of a string compare.
---
 src/video/wayland/SDL_waylandwindow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 9143c78a51f22..81d7ffb0802db 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -82,7 +82,7 @@ static bool ShouldMaskFullscreen()
     }
 
     const char *desktop = SDL_getenv("XDG_CURRENT_DESKTOP");
-    if (desktop && SDL_strcmp(desktop, "KDE") == 0) {
+    if (desktop && SDL_strstr(desktop, "KDE") != NULL) {
         mask_required = 1;
     } else {
         mask_required = 0;