Closed ghost closed 4 years ago
That's because you do device.set_selection()
per-mime-type, while it should be done once, for all offered mime types; and then when a certain mime type is requested for that offer, the correct data should be sent as the response.
I suggest adding a test for multiple mime types right away so that it's easy to see if it works properly.
Thank'you for the feedback, I'll see to it!
I implemented a test that passes, but I'm not sure if it checks the correct behavior for "contents" (assert_eq!(contents, [1, 3, 3, 7, 2, 4, 4]);
)
Done. I think it's ready to be merged. The thing about RAII guards in make_source belongs to another issue/pull request, in my opinion.
Thanks!
I've tried implementing copy_multi, but this code doesn't seem to work as intended. It seems to overwrite all selections with the last one, rather then offering them simultaneously.