SDL: x11: request available clipboard mime-types on video init

From 8bba24757d5d9d46937c1798d3622a2e16908e9e Mon Sep 17 00:00:00 2001
From: krizej <[EMAIL REDACTED]>
Date: Mon, 19 May 2025 20:04:40 +0200
Subject: [PATCH] x11: request available clipboard mime-types on video init

---
 src/video/x11/SDL_x11video.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c
index 6b3a986d3199b..80c2abff9e1a9 100644
--- a/src/video/x11/SDL_x11video.c
+++ b/src/video/x11/SDL_x11video.c
@@ -447,6 +447,10 @@ static bool X11_VideoInit(SDL_VideoDevice *_this)
 
     X11_InitPen(_this);
 
+    // Request currently available mime-types in the clipboard.
+    X11_XConvertSelection(data->display, data->atoms.CLIPBOARD, data->atoms.TARGETS,
+            data->atoms.SDL_FORMATS, GetWindow(_this), CurrentTime);
+
     return true;
 }