Browse Source

x11: request available clipboard mime-types on video init

krizej 4 months ago
parent
commit
8bba24757d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/video/x11/SDL_x11video.c

+ 4 - 0
src/video/x11/SDL_x11video.c

@@ -447,6 +447,10 @@ static bool X11_VideoInit(SDL_VideoDevice *_this)
 
 
     X11_InitPen(_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;
     return true;
 }
 }