From dd65fc2289aa58fce21f19327fd9be4424e95724 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Mon, 21 Apr 2025 22:40:53 +0300 Subject: [PATCH] Implement Wayland text clipboard data handling --- Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp b/Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp index a89a95e65..c72d573a0 100644 --- a/Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp +++ b/Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp @@ -22,6 +22,7 @@ #include "Engine/Platform/Linux/IncludeX11.h" +#include #include #include #include @@ -1113,9 +1114,7 @@ void SDLClipboard::SetText(const StringView& text) //X11::XGetSelectionOwner(xDisplay, xAtomPrimary); } else - { - LOG(Warning, "Wayland clipboard support is not implemented yet."); // TODO: Wayland - } + SDL_SetClipboardText(StringAnsi(text).GetText()); } void SDLClipboard::SetRawData(const Span& data) @@ -1152,8 +1151,7 @@ String SDLClipboard::GetText() } else { - LOG(Warning, "Wayland clipboard is not implemented yet."); // TODO: Wayland - return String::Empty; + return String(SDL_GetClipboardText()); } }