Receiving clipboard events without a window
On Fedora33/gnome3/wayland, the following code doesn't receive clipboard events:
#include <gtk/gtk.h>
static void
clip_changed (GdkClipboard *clip, void *user_data)
{
g_debug ("clipboard changed");
}
int
main (int argc, char **argv)
{
gtk_init ();
GdkDisplay *display = gdk_display_get_default ();
GdkClipboard *clip = gdk_display_get_clipboard (display);
g_signal_connect (clip, "changed", G_CALLBACK(clip_changed), NULL);
while (true)
g_main_context_iteration (NULL, true);
}
tests/testclipboard2 seems to receive the events (mainly, but not always) on focus.
Is something wrong or is it by design? Shouldn't it be documented in either case?
thanks
Edited by Marc-André Lureau