From af3dea4bb671e97eeb5fd2208f691f5e746a3b69 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 6 May 2021 17:14:51 -0400 Subject: Add test for copy/paste --- src/x11.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/x11.c b/src/x11.c index 3c3059a..3ead696 100644 --- a/src/x11.c +++ b/src/x11.c @@ -1,5 +1,5 @@ /* - Copyright 2012-2020 David Robillard + Copyright 2012-2021 David Robillard Copyright 2013 Robin Gareus Copyright 2011-2012 Ben Loftis, Harrison Consoles @@ -1357,12 +1357,11 @@ puglSetClipboard(PuglView* const view, const PuglX11Atoms* const atoms = &view->world->impl->atoms; PuglStatus st = puglSetInternalClipboard(view, type, data, len); - if (st) { - return st; + if (!st) { + XSetSelectionOwner(impl->display, atoms->CLIPBOARD, impl->win, CurrentTime); } - XSetSelectionOwner(impl->display, atoms->CLIPBOARD, impl->win, CurrentTime); - return PUGL_SUCCESS; + return st; } #ifdef HAVE_XCURSOR -- cgit v1.2.1