Skip to content

Commit cf12496

Browse files
flibitijibiboslouken
authored andcommitted
wayland: Fall back to clipboard source data if offer came up empty
1 parent 282c052 commit cf12496

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/video/wayland/SDL_waylandclipboard.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ Wayland_GetClipboardText(_THIS)
8080
if (length > 0) {
8181
text = (char*) buffer;
8282
}
83-
} else if (data_device->selection_source != NULL) {
83+
}
84+
if (length == 0 && data_device->selection_source != NULL) {
8485
buffer = Wayland_data_source_get_data(data_device->selection_source,
8586
&length, TEXT_MIME, SDL_TRUE);
8687
if (length > 0) {

0 commit comments

Comments
 (0)