aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-05-06 17:14:51 -0400
committerDavid Robillard <d@drobilla.net>2021-05-06 17:14:51 -0400
commitaf3dea4bb671e97eeb5fd2208f691f5e746a3b69 (patch)
treedf5d62def6d7294da583f5c2d2157c221aa24337 /src
parentedbbef90e1d49d48b10fa2de01c03eed8b37dcad (diff)
downloadpugl-af3dea4bb671e97eeb5fd2208f691f5e746a3b69.tar.gz
pugl-af3dea4bb671e97eeb5fd2208f691f5e746a3b69.tar.bz2
pugl-af3dea4bb671e97eeb5fd2208f691f5e746a3b69.zip
Add test for copy/paste
Diffstat (limited to 'src')
-rw-r--r--src/x11.c9
1 files changed, 4 insertions, 5 deletions
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 <d@drobilla.net>
+ Copyright 2012-2021 David Robillard <d@drobilla.net>
Copyright 2013 Robin Gareus <robin@gareus.org>
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