Skip to content

gdkdisplay-wayland: Init selection before roundtrips

Gaël Bonithon requested to merge neyfag/gtk:fix-display-selection-init into gtk-3-24

Some of the listeners connected during the initial roundtrip assume a non-NULL selection, when they finally invoke functions such as gdk_wayland_selection_ensure_offer(), gdk_wayland_selection_ensure_primary_offer() or gdk_wayland_selection_set_offer(). The GdkWaylandSelection should therefore be initialized before the second series of roundtrips, as the compositor may have already sent a selection by then.


We had this problem while playing with an experimental embedded compositor library in Xfce.

Merge request reports