summaryrefslogtreecommitdiff
path: root/gtk/gtkclipboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkclipboard.c')
-rw-r--r--gtk/gtkclipboard.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c
index 24073523cf..a460e477bd 100644
--- a/gtk/gtkclipboard.c
+++ b/gtk/gtkclipboard.c
@@ -23,6 +23,9 @@
#include "gtkclipboard.h"
#include "gtkclipboardprivate.h"
+#ifdef GDK_WINDOWING_WAYLAND
+#include "gtkclipboard-waylandprivate.h"
+#endif
#include "gtkinvisible.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
@@ -1914,7 +1917,13 @@ clipboard_peek (GdkDisplay *display,
if (!tmp_list && !only_if_exists)
{
- clipboard = g_object_new (GTK_TYPE_CLIPBOARD, NULL);
+#ifdef GDK_WINDOWING_WAYLAND
+ if (GDK_IS_WAYLAND_DISPLAY (display))
+ clipboard = g_object_new (GTK_TYPE_CLIPBOARD_WAYLAND, NULL);
+ else
+#endif
+ clipboard = g_object_new (GTK_TYPE_CLIPBOARD, NULL);
+
clipboard->selection = selection;
clipboard->display = display;
clipboard->n_cached_targets = -1;