clipboard-wayland: flush display after creating data sources

The data source requests are prepared inside create_data_sources from a
different thread than the clipboard thread, so it is necessary to flush
here. Otherwise, if mpv is not already managing the current selection,
we'll have to wait until the clipboard thread reenters
clipboard_wayland_dispatch_events for the request to be sent to the
compositor and have the other clients be sent new the new selection,
which may take up to 10 seconds.
This commit is contained in:
Attila Fidan
2025-05-13 13:41:48 +00:00
committed by Dudemanguy
parent b3070d1255
commit c399422722
+1
View File
@@ -298,6 +298,7 @@ static void create_data_sources(struct clipboard_wayland_priv *wl)
seat_create_data_source(seat, true);
}
}
wl_display_flush(wl->display);
}
static void clipboard_wayland_uninit(struct clipboard_wayland_priv *wl)