From cf124963116c016df131faa89f32d6565c08a326 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Thu, 8 Apr 2021 15:29:54 -0400 Subject: [PATCH] wayland: Fall back to clipboard source data if offer came up empty --- src/video/wayland/SDL_waylandclipboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/wayland/SDL_waylandclipboard.c b/src/video/wayland/SDL_waylandclipboard.c index a94413970..789273b53 100644 --- a/src/video/wayland/SDL_waylandclipboard.c +++ b/src/video/wayland/SDL_waylandclipboard.c @@ -80,7 +80,8 @@ Wayland_GetClipboardText(_THIS) if (length > 0) { text = (char*) buffer; } - } else if (data_device->selection_source != NULL) { + } + if (length == 0 && data_device->selection_source != NULL) { buffer = Wayland_data_source_get_data(data_device->selection_source, &length, TEXT_MIME, SDL_TRUE); if (length > 0) {