Gtk_clipboard_set_with_owner in GTK/GDK 4

Hi all!

I was reading the @mclasen article about how the data transfer (will) work in GTK4 and as far as I understand functions like gtk_clipboard_set_with_owner are going away.

In Remmina we use this function to set just the owner and then when the application (the user) paste the data we actually use the data in the callback function.

Is it still possible in the latest GTK? I’m quite confused about the change and I’d like some directions.

Thanks!!!

In GTK4, you would call gdk_clipboard_set_content(), and give it a GdkContentProvider that can hold a reference to the owner, and produce the content at a later time, when it is actually needed

1 Like

Lovely! I’ll have a look. Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.