This repository was archived by the owner on Nov 1, 2021. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork341
This repository was archived by the owner on Nov 1, 2021. It is now read-only.
Two DataOffer events when taking the clipboard #3296
Open
Description
I'm writinga clipboard monitor using thewlr-data-control-unstable-v1
protocol.
Whenever I take a selection (e.g.: callzwlr_data_control_device_v1::set_selection
) I immediately get TWOzwlr_data_control_device_v1::data_offer
events.
It's odd to even get one (I didn't expect to be notified of my own selections), but the second one seems like a bug.
My code linked above is a bit messy still, but serves as a reproduction example. I hope my own logging doesn't get in the way (I was also learning along the way), but it can be reproduced by:
- For consistency, clear both selections before starting (copy something onto both on a client and close it).
- Run
WAYLAND_DEBUG=1 cargo run
. 86251b9a works to repro this. - On another client, select some text (so that it's copied into the PRIMARY selection).
clipmon
will copy all data from the selection and take the selection itself.- After taking the selection, we gettwo
data_offer
events:
[1031691.210] zwlr_data_control_device_v1@5.data_offer(new id zwlr_data_control_offer_v1@3142568880)...[1031691.917] zwlr_data_control_device_v1@5.data_offer(new id zwlr_data_control_offer_v1@3142577344)
They are also both for the primary selection:
[1031691.522] zwlr_data_control_device_v1@5.primary_selection(zwlr_data_control_offer_v1@4278190081)...[1031692.235] zwlr_data_control_device_v1@5.primary_selection(zwlr_data_control_offer_v1@4278190082)
wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3296
Metadata
Metadata
Assignees
Labels
No labels