Fix DnD to Wayland FLTK app on the KDE/Plasma desktop

This commit is contained in:
ManoloFLTK 2024-05-11 08:27:05 +02:00
parent f56999aaf8
commit 0078733fcb

View File

@ -1,7 +1,7 @@
//
// Wayland-specific code for clipboard and drag-n-drop support.
//
// Copyright 1998-2023 by Bill Spitzak and others.
// Copyright 1998-2024 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@ -297,6 +297,9 @@ static void data_offer_handle_offer(void *data, struct wl_data_offer *offer,
} else if (strcmp(mime_type, wld_plain_text_clipboard) == 0 && !fl_selection_type[1]) {
fl_selection_type[1] = Fl::clipboard_plain_text;
fl_selection_offer_type = wld_plain_text_clipboard;
} else if (strcmp(mime_type, "text/plain") == 0 && !fl_selection_type[1]) {
fl_selection_type[1] = Fl::clipboard_plain_text;
fl_selection_offer_type = "text/plain";
}
}