diff --git a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
index 659be127d..a4a5d967a 100644
--- a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx+++ b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx@@ -630,6 +630,7 @@ static void primary_selection_device_handle_selection(void *data,
struct zwp_primary_selection_offer_v1 *offer) {
if (primary_selection_offer) zwp_primary_selection_offer_v1_destroy(primary_selection_offer);
primary_selection_offer = offer;
+ fprintf(stderr, "primary_selection_offer set to %p\n", (void *) primary_selection_offer);
}
static const struct zwp_primary_selection_device_v1_listener primary_selection_device_listener = {
@@ -693,6 +694,7 @@ void Fl_Wayland_Screen_Driver::paste(Fl_Widget &receiver, int clipboard, const c
// otherwise get the compositor to return it:
if (clipboard == 0) {
#if HAVE_PRIMARY_SELECTION
+ fprintf(stderr, "at paste, primary_selection_offer set to %p\n", (void *) primary_selection_offer);
if (primary_selection_offer) {
paste_primary_selection_offer();
Fl::e_text = (char*)selection_string[0].c_str();
This is what I see:
% ./editor # foo
Wayland compositor unknown
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to 0x55cb5f02ef50
primary_selection_offer set to 0x55cb5f005160
at paste, primary_selection_offer set to 0x55cb5f005160
at paste, primary_selection_offer set to 0x55cb5f005160
% ./editor # bar
Wayland compositor unknown
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to (nil)
primary_selection_offer set to 0x55d22d99a190
at paste, primary_selection_offer set to 0x55d22d99a190
at paste, primary_selection_offer set to 0x55d22d99a190
primary_selection_offer set to 0x55d22d8bda70
at paste, primary_selection_offer set to 0x55d22d8bda70
at paste, primary_selection_offer set to 0x55d22d8bda70
primary_selection_offer set to (nil)
at paste, primary_selection_offer set to (nil) <--- nothing even if text is selected
Something seems to set the primary_selection_offer to null, so it doesn't paste anything.
I attach you the logs running the editor with WAYLAND_DEBUG=1.
Not sure how to improve the reproducibility of the test other than asking you to try with sway.
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/1621/5960787247@github.com>
Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.