DataOffers are not sent to all datadevices on a client
Was debugging a kwin issue, I asked a friend for a log on gnome shell and it seems you guys have the same bug as us but luckily for you, yours bug is the other way round and happens to not have any symptoms (yet!).
Firefox creates 2 data devices.
In the log below, 21 and 32. On focus only 32 is getting an offer.
benjamin@ben-x1 ~]$ WAYLAND_DEBUG=1 firefox |& grep data
[1426800.548] wl_registry@2.global(7, "wl_data_device_manager", 3)
[1426800.563] -> wl_registry@2.bind(7, "wl_data_device_manager", 3, new id [unknown]@12)
[1426815.525] -> wl_data_device_manager@12.get_data_device(new id wl_data_device@21, wl_seat@18)
[1427800.046] wl_registry@24.global(7, "wl_data_device_manager", 3)
[1427800.059] -> wl_registry@24.bind(7, "wl_data_device_manager", 3, new id [unknown]@35)
[1428036.540] -> wl_data_device_manager@35.get_data_device(new id wl_data_device@32, wl_seat@38)
[1428184.120] wl_registry@42.global(7, "wl_data_device_manager", 3)
[1428988.667] wl_registry@2.global(7, "wl_data_device_manager", 3)
[1428988.682] -> wl_registry@2.bind(7, "wl_data_device_manager", 3, new id [unknown]@12)
[1428995.645] -> wl_data_device_manager@12.get_data_device(new id wl_data_device@21, wl_seat@18)
[1429260.211] wl_registry@54.global(7, "wl_data_device_manager", 3)
[1429260.221] -> wl_registry@54.bind(7, "wl_data_device_manager", 3, new id [unknown]@41)
[1429601.132] wl_registry@24.global(7, "wl_data_device_manager", 3)
[1429601.154] -> wl_registry@24.bind(7, "wl_data_device_manager", 3, new id [unknown]@35)
[1429857.698] wl_data_device@32.data_offer(new id wl_data_offer@2427550784)
[1429858.073] wl_data_offer@4278190080.offer("text/html")
[1429858.324] wl_data_offer@4278190080.offer("text/plain")
[1429858.346] wl_data_offer@4278190080.offer("text/plain;charset=utf-8")
[1429858.353] wl_data_offer@4278190080.offer("STRING")
[1429858.375] wl_data_offer@4278190080.offer("TEXT")
[1429858.389] wl_data_offer@4278190080.offer("COMPOUND_TEXT")
[1429858.407] wl_data_offer@4278190080.offer("UTF8_STRING")
[1429858.416] wl_data_device@32.selection(wl_data_offer@4278190080)
[1429858.431] gtk_primary_selection_device@40.data_offer(new id gtk_primary_selection_offer@2459677008)
[1430196.990] wl_registry@2.global(7, "wl_data_device_manager", 3)
[1430197.002] -> wl_registry@2.bind(7, "wl_data_device_manager", 3, new id [unknown]@12)
[1430202.562] -> wl_data_device_manager@12.get_data_device(new id wl_data_device@21, wl_seat@18)
[1430635.150] wl_registry@2.global(7, "wl_data_device_manager", 3)
[1430635.172] -> wl_registry@2.bind(7, "wl_data_device_manager", 3, new id [unknown]@12)
[1430641.770] -> wl_data_device_manager@12.get_data_device(new id wl_data_device@21, wl_seat@18)
[1430694.537] wl_registry@66.global(7, "wl_data_device_manager", 3)
[1430765.442] wl_registry@68.global(7, "wl_data_device_manager", 3)
[1442471.404] wl_data_device@32.data_offer(new id wl_data_offer@2355536448)
[1442471.414] wl_data_offer@4278190082.offer("text/plain")
[1442471.422] wl_data_offer@4278190082.offer("text/plain;charset=utf-8")
[1442471.429] wl_data_offer@4278190082.offer("STRING")
[1442471.435] wl_data_offer@4278190082.offer("TEXT")
[1442471.441] wl_data_offer@4278190082.offer("COMPOUND_TEXT")
[1442471.447] wl_data_offer@4278190082.offer("UTF8_STRING")
[1442471.453] wl_data_device@32.selection(wl_data_offer@4278190082)
[1442471.460] -> wl_data_offer@4278190080.destroy()
[1442471.468] gtk_primary_selection_device@40.data_offer(new id gtk_primary_selection_offer@2355536608)
Relevant chat on #wayland
[14:16] <d_ed> Can I clarify a protocol situation. If a client creates multiple data device managers - and therfore multiple data devices, on focus should they all get offers? [14:22] <emersion> yes
Edited by David Edmundson